During Friday's vote in Germany's lower house the Left Party raised its opposition to the bill by holding up placards with the names of people killed in a Nato bombing ordered by a German officer in September.
"Germany is involved in a war against the ordinary population in Afghanistan," Christine Buchholz, a Left Party politician said during the debate.
"However you justify the war, you are deciding today about life or death."
'Victory for sense'
But despite growing public disillusionment over the conflict, some 429 of 622 lawmakers backed the troop increase, with 111 voting against.
Guido Westerwelle, Germany's foreign minister, said the vote was a "victory for sense and responsibility".
"Our Afghanistan policy could not carry on as it had before, everyone knows that. But at the same time, we could not rashly leave and look away."
German troops currently form the third-largest contingent in the 110,000-strong international force behind the United States and Britain.
The new head of the German army said earlier February that Afghanistan could be as much as two decades away from being a functioning state.
The vote came as Taliban suicide bombers hit private guesthouses in the centre of Kabul, killing 16 people including foreigners in one of the deadliest attacks on the Afghan capital in a year.