The offer comes with several conditions, including a formal request from the Afghan government because "we want to be welcome" and a UN Security Council resolution, said Defence Minister Thomas de Maiziere.
It would also require a reasonable security situation and matching commitments by NATO allies in other parts of the country, he said, adding that he had informed major German parties of the plan that would require parliamentary approval.
"The government is ready to offer, from 2015 and for initially two years, sending about 600 to 800 soldiers for expected training, advisory and support missions," De Maiziere said at a press conference.
"This offer is a declaration of intent by the federal government. Germany is taking an early and timely position on this important question."
Germany – where memories of World War II aggression make deploying soldiers abroad an especially sensitive topic – has sent combat troops to northern Afghanistan but earned criticism from allies for failing to join the 2011 NATO mission in Libya.
If the 2015 deployment goes ahead, Germany would base its military personnel in Kabul and in the country's north around Mazar-i-Sharif, the minister said, warning however of the "evolving security and political situation" in the country.
From 2017, Germany would be ready to deploy 200-300 troops in the capital Kabul only, he said. They could help the Afghan army and allies in fields such as training, logistics, medical support, transport, security and evacuation, he said.
Germany now has the third-biggest foreign troop deployment in Afghanistan after the United States and Britain, but has drawn down numbers from more than 5,000 to 4,200 now.
NATO plans to end by late-2014 its combat operations in the country, launched after the 9/11 attacks against the United States by al-Qaeda, which had sought sanctuary with the radical Islamist Taliban.
The alliance plans to keep 8,000 to 12,000 troops in the country from 2015 to support the Afghan army as it seeks to maintain security and stability.