Born in Nuremberg, Mahlein's father was a member of the Communist Party of Germany (KPD) who was arrested by the Nazis in 1935 and sentenced to two-and-a-half years in prison.
Leonhard undertook an apprenticeship in printing, but was forced to leave his initial placement due to his own anti-Nazi views.
He was eventually able to complete his apprenticeship, and joined the Printing and Paper Union, becoming leader of its youth section in Nuremberg, and also chaired his local works council.
He was a supporter of the KPD until 1952, but in 1956, he joined the Social Democratic Party of Germany, and was also elected as the deputy chair of the Printing and Paper Union in Bavaria.
Instead, he became joint editor of Nachrichten zur Wirtschafts- und Sozialpolitik, a monthly magazine linked with the KPD, until his death in 1985.