Josef Hlávka was born on 15 February 1831 in the area of Přeštice in western Bohemia. From 1847 to 1851 he studied engineering and structural building at the Prague Polytechnic, then from 1851 to 1854 architecture at the Vienna Academy of Fine Arts, which awarded him its state prize in 1854. With the Viennese building contractor František Šebek he trained as a mason and in 1855 took charge of his building office. In 1856 a scholarship took him on a study tour through Europe that in the end lasted three years.
Afterwards he settled in Vienna and obtained his builder's licence in 1860. His name was made by constructing the Lazaristenkirche on Kaiserstraße to plans by Friedrich von Schmidt (1860 to 1862). Besides about 140 private commissions, mostly apartment houses, he built to other architects' designs the Court Opera (1861 to 1869), the Akademisches Gymnasium, the Deutschmeisterpalais on Parkring and St. Othmar unter den Weißgerbern. From 1864 the Metropolitan's residence in Czernowitz rose to his own design; it is now a UNESCO World Heritage Site. The Academy of Fine Arts admitted him as a member in 1866. He lived at Löwengasse 22, and a plaque at Opernring 6 commemorates him.
After a nervous breakdown in 1869 he had to give up his firm in 1873 and moved to the Lužany estate in Bohemia. From then on he supported Czech science and art. In 1883 he entered the Reichsrat, in 1891 the House of Lords for life; that same year he became the first president of the Prague Academy of Sciences and Arts. He put his fortune into the Hlávka Foundation. He died on 11 March 1908 in Prague and lies in the family grave he designed himself in Přeštice.
