Heinrich Rudolf Hertz was born in 1857 in Hamburg, then a sovereign state of the German Confederation, into a prosperous and cultured Hanseatic family. His father Gustav Ferdinand Hertz (originally named David Gustav Hertz) (1827–1914) was a barrister and later a senator. His mother was Anna Elisabeth Pfefferkorn.
Hertz's father converted from Judaism to Christianity in 1834.
His mother's family was a Lutheran pastor's family.
While studying at the Gelehrtenschule des Johanneums in Hamburg, Hertz showed an aptitude for sciences as well as languages, learning Arabic and Sanskrit. He studied sciences and engineering in the German cities of Dresden, Munich and Berlin, where he studied under Gustav R. Kirchhoff and Hermann von Helmholtz. In 1880, Hertz obtained his PhD from the University of Berlin, and for the next three years remained for post-doctoral study under Helmholtz, serving as his assistant. In 1883, Hertz took a post as a lecturer in theoretical physics at the University of Kiel. In 1885, Hertz became a full professor at the University of Karlsruhe.
In 1886, Hertz married Elisabeth Doll, the daughter of Dr. Max Doll, a lecturer in geometry at Karlsruhe. They had two daughters: Johanna, born on 20 October 1887 and Mathilde, born on 14 January 1891, who went on to become a notable biologist. During this time Hertz conducted his landmark research into electromagnetic waves.
Hertz took a position of Professor of Physics and Director of the Physics Institute in Bonn on 3 April 1889, a position he held until January 1894. During this time he worked on theoretical mechanics with his work published in the book Die Prinzipien der Mechanik in neuem Zusammenhange dargestellt (The Principles of Mechanics Presented in a New Form), published posthumously in 1894.
In 1892, Hertz was diagnosed with an infection (after a bout of severe migraines) and underwent operations to treat the illness. He died of granulomatosis with polyangiitis at the age of 36 in Bonn, Germany in 1894, and was buried in the Ohlsdorf Cemetery in Hamburg.
Hertz's wife, Elisabeth Hertz née Doll (1864–1941), did not remarry. Hertz left two daughters, Johanna (1887–1967) and Mathilde (1891–1975). Hertz's daughters never married and he has no descendants.