The June ruling by a Cologne district court that circumcision constitutes "bodily harm" sparked an emotional national debate about religious freedom and the procedure itself.
An embarrassed German government pledged to bring in new legislation by the autumn to safeguard the right of parents to have their sons circumcised.
"It was always our intention to lift this ruling," German government spokesman Steffen Seibert told a news conference.
Parliament must still approve the bill for it to become law.
The speed with which national lawmakers agreed to draw up a new law underscored sensitivity to charges of intolerance in a country haunted by its Nazi past.
German Chancellor Angela Merkel said the country risked becoming a laughing stock if Jews were not allowed to practice their rituals.
The bill states that the operation should take place with the most effective pain relief possible and only if parents have been fully informed about the nature of the procedure. It makes no mention of religious motivations for circumcision.
The court ban had applied only to the Cologne region but doctors across the country refused to carry out operations because of what they saw as a risk of legal action.
"It was very important that our government reacted so quickly and responsibly. The proposal is balanced and suitable for lifting the legal uncertainty," said Charlotte Knobloch, a German Jewish leader.
She expressed her relief that "Germany would not become the one country in the world where Jewish people cannot practice their religion" and added she hoped the damaging public debate about circumcision would end.
About 120,000 Jews are registered as living in Germany along with around 4 million Muslims, many of them from Turkey.
The Cologne court, ruling in the case of a Muslim boy who suffered bleeding after circumcision, said the practice inflicted bodily harm and should not be carried out on young boys, although it could be performed on older males with their consent.
Anticipating the government bill, Berlin city authorities announced last month that parents were free to have their sons circumcised without fear of prosecution and the operations resumed in the German capital.