Born in Aarau, he became an artillery lieutenant in 1840, and then spent six years in travelling (visiting England among other countries), before he became a partner in his father's business in 1846. In 1847 he saw his first active service (as artillery captain) in the short Swiss Sonderbund war.
In 1860 he abandoned mercantile pursuits for a purely military career, becoming colonel and inspector-general of the Swiss artillery. In 1870 he was commander-in-chief of the Swiss army, which guarded the Swiss border, in the Jura, during the Franco-German War, and in February 1871, as such, concluded the Convention of Verrières with General Clinchant for the disarming and the interning of the remains of Bourbaki's army, when it took refuge in Switzerland.
In 1875, he became the commander-in-chief of the Swiss artillery, which he did much to reorganize, helping also in the reorganization of the other branches of the Swiss army. He died in 1894 in his native town of Aarau.
- "General Hans Herzog" (1915) by Hermann Haller, equestrian relief above portal, Aarau