At least two other German soldiers and 13 civilians were reported wounded in the attack in the city of Konduz.
Reports said the attack occurred after German vehicles stopped at the market so soldiers could go shopping.
A Taliban commander has claimed responsibility for the bombing.
German Chancellor Angela Merkel said she was disgusted by what she called "perfidious murders" aimed at preventing reconstruction in Aghanistan. She vowed that reconstruction efforts would continue.
Germany has some 3,200 soldiers operating in northern Afghanistan, which has seen relatively few attacks compared to southern Afghanistan.
Separately, in Kapisa Province northeast of Kabul, militants were reported to have attacked U.S.-led coalition and Afghan forces late on May 18.
Coalition spokesman Chris Belcher said air strikes were called in and that "several dozen" militants were believed killed.
(compiled from agency reports)
RFE/RL Afghanistan Report
SUBSCRIBE For regular news and analysis on Afghanistan by e-mail, subscribe to "RFE/RL Afghanistan Report."