He was a pioneer of modern forensic pathology. In 1861 he earned his medical doctorate at Charles University in Prague, and in 1869 became a professor of Staatsarzneikunde (State Medical Research) at the University of Innsbruck. He obtained this position with assistance from Carl Rokitansky (1804-1878).
In 1875 he became a professor of forensic medicine at the University of Vienna.
Hofmann is remembered for his diligent work in development of forensic medicine as a separate scientific entity. He is credited for introducing and expanding methodologies such as microscopy, spectroscopy and laboratory animal experimentation into forensic medicine at Vienna.
He wrote two important books Lehrbuch für gerichtliche Medizin (Textbook of Forensic Medicine) and Atlas der gerichtlichen Medizin (Atlas of Forensic Medicine), both of which have been translated into different languages.
Hofmann was instrumental in autopsy studies of the nearly 400 victims who perished at the Viennese Ringtheater fire on December 8, 1881, where carbon monoxide poisoning was deemed to be an underlying cause of death.
Also, he conducted the report on the controversial death of Crown Prince Rudolf of Austria (1858-1889) at Mayerling. With Hermann Reinhard (1816-1892), he was one of the founders of forensic entomology.