The woman was found guilty of killing the one-day-old baby boy in her apartment building's cellar in March.
The baby's body was discovered in clothing donation container by a worker collecting the clothes.
The mother of eight admitted to killing her baby during the trial, saying his birth came at an inconvenient time.
The defendant had already been sentenced to two years of probation for the attempted murder of another one of her children. In that case she abandoned the baby girl in her cellar, but a neighbour found the child and it was later adopted.
In recent years there have been a number of high-profile cases of infanticide in Germany, with the most notorious involving a woman jailed for 15 years in 2006 for the manslaughter of eight babies.
Sabine Hilschenz, a divorced, unemployed and alcoholic dental assistant from a depressed area of eastern Germany, hid the corpses in buckets, flowerpots and an old fish tank at her parents' home.
In October, the remains of four babies were found in a Berlin apartment following the suicide of their alleged mother. Later the same month a man's dog found a dead infant along Munich's Isar River bank.