He was born in Stuttgart on 31 May 1817, the son of an innkeeper. He was educated at the Gymnasium Illustre of Stuttgart, and in 1835 proceeded to the University of Tübingen as a theological student, where, with a view to entering the ministry, he entered the Protestant theological seminary. However, he found the strict discipline distasteful; he broke the rules and was expelled in 1836. He studied law for a short time, but decided to return to Stuttgart, and became editor of August Lewald's periodical Europa. Called out for military service, he had hardly joined his regiment when he became embroiled with a military officer with an act of insubordination, and had to flee to Emmishofen, Switzerland in 1839.
His Gedichte eines Lebendigen ("Poems of a living man") were published in Zürich between 1841-1843 and immediately banned in Prussia. The lyrics combined revolutionary sentiment with a popular style and soon placed him at the forefront of the Vormärz revolutionary movement. The fervent effusions of his poems became immensely popular, so that when, after a short trip to Paris, Herwegh journeyed through Germany in 1842, he was greeted with enthusiasm everywhere.
King Friedrich Wilhelm IV. gave him an audience, and assured him that he liked nothing better than an energetic opposition. But Herwegh overstepped all the bounds of conventionality in a letter to the King, and was hurried out of Prussia. At Zürich, he found no pleasant reception. But the king of Württemberg pardoned him for desertion from military service, and in the canton of Basel, of which he now became a citizen, he married Emma Siegmund, daughter of a Jewish merchant at Berlin. He next took up his abode in Paris, and wrote a second volume of Gedichte eines Lebendigen (1844). He also translated all of Lamartine into German (1843-1844).
During the failed German revolution of 1848, together with a group of German emigrants, he led a military mission to Baden as part of the Hecker Uprising; with its defeat at Kadern, he had to flee to Switzerland once again. He lived in Zürich; after an amnesty he moved to Baden-Baden, Germany. Herwegh wrote songs for Lassalle's Worker's Society and the Social Democratic Worker's Party. In 1877, Neue Gedichte was published. The most important work of his later years was the translation of many of Shakespeare's plays. He died in Lichtental.
While other poets such as Ferdinand Freiligrath gave up their radical politics later on, Herwegh never changed his radical outlook and his commitment to radical democracy. He was disappointed by and criticised Prussian nationalism and Bismarck's war against France and annexation of Alsace-Lorraine in 1870/71. In Herwegh's mind, poetry is a first step towards political action, it should however not be artless. Consequently, he--like Heinrich Heine--defended Goethe.