Police commandos captured the hijacker, who did not resist and had freed most of his hostages after stopping the bus on a highway south of Hanover following a 75-mile cross-country chase from the northern German city of Bremen, police spokesman Walter Wollott said.
An N24 television reporter at the scene said he heard no shots fired. Neither the hostages nor the hijacker were injured, officials said.
The man armed hijacked a bus in Bremen on Friday morning, taking 18 passengers, including children, hostage and leading police on a cross-country highway chase.
The hijacker took a seat behind the driver, and with a gun trained on his back forced the bus onto the autobahn, with police cars and ambulances trailing at a distance.
After about two hours, the hijacker stopped the bus on the autobahn south of Hanover and began negotiating with authorities. He asked for water, a cell phone and a replacement bus driver and he demanded to talk to Bremen's mayor, Henning Scherf, police spokesman Ronald Walter said.
It was not known whether he talked with the mayor and his motives remained unclear.
The hijacker gradually freed 10 passengers after stopping, including a man suffering from faintness who police initially said had escaped. Three passengers were freed or managed to flee at the start of the drama.
Several children were among the last remaining captives, Wollott said earlier.
Police said the hijacker fired a shot, but the circumstances were unclear and authorities said they had no reports of injuries.
TV images showed the red-and-white bus speeding along the autobahn with a group of people huddled in the back apparently the hostages and the driver in a vest and tie, with the hijacker perched behind him in a dark shirt and baseball cap.
Police cars ringed the halted bus on a six-lane stretch and authorities closed off the autobahn in both directions near the town of Algermissen, causing huge traffic jams in the Friday afternoon rush hour.
Police said the bus driver contacted them soon after starting his trip at 9:17 a.m. (0717 GMT), saying he was diverting from his normal route. A sign at the front of the bus gave the original destination as Bremen's main train station.
Police established telephone contact with the hijacker, described by witnesses as a man with Mediterranean features and about 20 to 25 years old, police spokesman Heiner Melloh said.
It was Germany's second bus hijacking in two weeks.
On April 11, an armed ex-convict commandeered a Berlin city bus after a bank robbery. Police stormed the bus after more than four hours, shooting the hijacker in the shoulder and freeing his last two hostages unharmed.