In 1716 Augustus II the Strong inaugurated a penitentiary, almshouse and orphanage in the castle, which is used as a prison (Justizvollzugsanstalt) up to today.
The hospital ‘Chur-Sächisches Zucht-Waysen und Armen-Haus’ in Waldheim was the first state institution dedicated to the care of the mentally ill on the German territory.
In the Nazi era, Waldheim Prison became notorious as a detention centre for political opponents, convicted for preparation of high treason, undermining military morale or just listening to banned Feindsender radio stations.
Among the inmates were several resistance fighters like Eva Schulze-Knabe, who was convicted by the People's Court in 1942 and freed at the end of World War II.
From April to June 1950, the Communist authorities put about 3,400 alleged war and Nazi criminals to the Waldheim Trials, ending with prison terms and 32 death sentences.