Family members met the remains of the soldiers when the military plane carrying the bodies landed in southern Germany. All four soldiers came from parts of Bavaria or from Ulm in Baden-Württemberg.
They will be buried on Saturday, with Chancellor Angela Merkel and Defence Minister Karl-Theodor zu Guttenberg to attend a special memorial service.
It has been a deadly period for the Bundeswehr in Afghanistan, with the rocket attack of April 15 coming hard on the heels of a Good Friday ambush by the Taliban that killed three German soldiers and injured another eight.
On Tuesday, four more Germans were wounded – some seriously – when their armoured Eagle IV vehicle crashed about 30 kilometres west of a German outpost at Fayzabad in the north of the country.
Since the beginning of the war in Afghanistan in 2001, Germany has lost 43 soldiers.
Five more soldiers injured in the attack of April 15 were returned to Germany late Tuesday evening for treatment at the Bundeswehr hospital at Koblenz. There were previously being treated in a military hospital in Istanbul, with flights were unable to get into Germany because of the volcanic ash cloud.
The head of the international force in Afghanistan, US General Stanley McChrystal, was set to land in Berlin Wednesday for talks with Defence Minister Karl-Theodor zu Guttenberg and other senior officials about a major offensive planned for the war-torn country.