The 30-year-old, who was not named by authorities, murdered the woman in front of two of her children outside a supermarket in the southern city of Prien am Chiemsee last April. She was stabbed 16 times.
Prosecutors told the court in the town of Traunstein that the accused was furious because she had turned her back on the Islamic faith.
The 38-year-old woman had earlier asked the man if he wanted to convert too, a request that was "irreconcilable with his Muslim faith," prosecutors said during the trial.
The accused's lawyer had asked the judges to show leniency, saying his client had had a difficult life and was exposed to violence from a young age, according to DPA news agency.
The suspect apologised to the victim's family in his final remarks in court.
In Germany, a life sentence means a convict can apply for parole after spending 15 years behind bars. But in this case the judges highlighted the "gravity" of the crime, meaning the accused is unlikely to be considered for early release, DPA reported.
Two of the woman's children, aged five and 11, watched as the man killed their mother. Her two other children are adults.
Passers-by tried to stop the attacker by hurling a shopping trolley at him.
After his arrest, the man claimed he had acted out of frustration about his looming deportation as a rejected asylum seeker.
He was initially held in a psychiatric ward for about three months and then transferred to standard pre-trial detention.
He will likely be deported after serving his sentence.