He was born in Waizenkirchen (now in Austria, but at that time still in Bavaria) and studied law at Ludwig Maximilian University of Munich, where he obtained his doctorate and entered the judiciary.
He began his literary career as a dramatist with Camoëns and Bretislav (1843), which caught the attention of the Bavarian king Ludwig I and led to a position at the court theatre.
After the Revolution of 1848, his support for Johannes Ronge and the failure of his marriage caused him professional difficulties and he was obliged to retire from the service, moving into a two-storey house at the head of the Tegernseer Landstraße in the south-east of the city.
He obtained great popularity in the 1860s as a prolific writer of historical novels based on events in Austrian and Bavarian history.
His plays, collected in 1853, include several historical dramas, such as Karl Stuart and Columbus, but his greater success was in portraying peasant life, as in Die Z'widerwurz'n (1878) and Der Tatzelwurm (1880).