The vote clears another hurdle in the coalition government's plans for limited legal availability of cannabis with numerous rules, regulations and restrictions.
The lower house backed the legislation by 407 votes to 226.
There were four abstentions.
The law is expected to be passed by the upper house of parliament, or Bundesrat, on March 22.
Health Minister Karl Lauterbach said the government's aim is to "fight the black market" and better protect young people.
He said current laws in the country have failed, with consumption rising and increasing problems with contaminated or overly concentrated cannabis.
"Whatever we do, we can't carry on like this," he told MPs.
"You can stick your head in the sand ... but we won't solve a single problem that way."
Lauterbach, who noted that he himself long opposed legalising cannabis, argued that addiction researchers say removing the taboo around marijuana and giving information on its risks is the right approach.
Cultivation and possession of small quantities for personal consumption would be permitted for adults starting April 1 while clubs for non-commercial cultivation will be legal from July 1.
There has been considerable criticism of the plans, including from medical associations, the judiciary and politicians.
"The protection of children and young people is nothing more than mere lip service in your law," said health politician Simone Borchardt of the opposition CDU.
Doctors, police officers and psychotherapists and all state interior ministers had warned against it, he said, adding that cultivation at home cannot be controlled.
Germans are divided on the legalisation of cannabis, according to a survey published ahead of the vote in parliament on Friday.
In the YouGov poll, 42 per cent of respondents said they were somewhat or completely in favour of legalisation while 47 per cent said they were somewhat or completely against it.
Another 11 per cent had no answer.
with AP