"I have come to Afghanistan to make clear: Germany will not leave Afghanistan in the lurch," Wulff stressed upon arriving for the first official visit of a German head of state to Kabul in 44 years.
"We will remain a reliable and durable friend and partner of Afghanistan after the handing over of security in 2014 as it overcomes future challenges," added the president in remarks released by his office.
Wulff was due to meet human rights groups before embarking on talks with Karzai, which were to prepare the ground for a major conference on Afghanistan in the former German capital Bonn in December.
Germany has around 5,000 troops supporting international efforts in Afghanistan - a mission polls consistently show is unpopular in the country.
A total of 52 German soldiers have fallen during the mission, according to the army's website, 34 of them under enemy fire.