About 100,000 German troops have served in Afghanistan since 2002, and 54 have died there -- 35 of them in combat -- in Germany's deadliest post-World War II deployment.
Defence Minister Thomas de Maiziere and Foreign Minister Guido Westerwelle travelled to Kunduz, via the German headquarters at Mazar-i-Sharif, on an unannounced visit for the handover ceremony Sunday.
"We hope and expect that the Afghan defence forces will ensure security in and around Kunduz and, if need be, restore it," said de Maiziere. "It is a great responsibility which we are handing over to the Afghan security forces."
International forces are due to end major combat operations in Afghanistan at the end of 2014, although Germany and others have pledged to continue a training and support mission beyond then.
Around 4,000 German soldiers are now in northern Afghanistan as part of ISAF, the International Security Assistance Force, including about 900 still in Kunduz.
Kunduz was where the German post-WW II defence force, the Bundeswehr, "fought for the first time, had to learn how to fight", said de Maiziere. "That was a turning point -- not only for the army, but also for German society."
The northern base had seen development and combat, tears and consolation, and deaths, the minister said, adding that Kunduz would "forever remain part of our collective memory".
Major General Joerg Vollmer, ISAF regional commander for northern Afghanistan, said that "we have brought Afghan security forces to a level of 80 percent -- the other 20 percent they will have to do themselves".
"As long as we're here, we will be asked to help," he told Die Welt daily. "At some stage, you have to cut the cord."
Outgoing Foreign Minister Westerwelle pledged that Germany, through development and other aid, would continue to support "a good future for Afghanistan".
"We continue our civic engagement with Afghanistan," he said.