At least 14 people were also injured in the blast which happened when the troops were conducting a foot patrol in Kunduz city.
Two Germans were among the injured, police chief Gen Nur Mohammad said.
About 3,000 German troops are based in northern Afghanistan as part of the Nato force in the country.
Maj John Thomas, a spokesman for Nato's International Security Assistance Force (ISAF), confirmed that there had been an attack in Kunduz, with a number of ISAF personnel killed or injured.
Witnesses say a suicide bomber on foot targeted the German patrol as they walked through a shopping district in the centre of the city.
"Suddenly we heard a big sound. We were frightened," Aziz, a shopkeeper, was quoted by Reuters as saying. "We saw very thick smoke and people rushing to escape."