After graduating from the Staatsgymnasium in Znaim (Znojmo), Josef Hupka returned to Vienna to study law. In 1897, the year of his doctorate, he converted from Judaism to Protestantism. After studying Romance philology in Leipzig, he habilitated in 1901 in Roman law at the Law and Political Science Faculty of the University of Vienna. A year later he also received habilitation for commercial and exchange law. After becoming an extraordinary professor in 1906, he was made an ordinary professor of commercial and exchange law nine years later. In 1910 he married Hermine Brüll (born 1888), daughter of the composer Ignaz Brüll, and had two children, Robert (born 1919) and Marie (born 1924). Hupka was a prominent art collector and patron of the arts and possessed etchings and drawings by Ferdinand Schmutzer, Franz Hofer and Moritz von Schwind. He was a member of the Dublettenkommission (duplicate commission), set up to oversee the sale of duplicates by the Albertina in the 1920s. He was also a friend of the Albertina director Josef Meder (1857–1934). In 1926/27 he became dean of his faculty and made no attempt to hide his liberal views: in 1930, for example, he advocated the abolition of laws making homosexuality between adult men a criminal offence. He was also instrumental in the abolition of the antisemitic Gleispach regulations of rector Wenzel Gleispach, which effectively limited the enrolment of Jewish students. In the sensational trial in Innsbruck of the Latvian photographer Philipp Halsmann, who was convicted of murdering his father, Hupka, along with the likes of Sigmund Freud, Albert Einstein and Jakob Wassermann, called for his pardon, which was granted in 1930 by Federal President Wilhelm Miklas. This had also been advocated by the Österreichische Liga für Menschenrechte (Austrian Human Rights League), to whose board Hupka had been elected in 1934. The annexation of Austria to the Nazi German Reich brought this activity and his university career to an abrupt end. In April 1938, Hupka, who had already been exposed to antisemitic attacks by German Nationalist students following his election, was suspended and subsequently forced into early retirement. His remuneration was stopped in March 1939. A few months later – his children were already in safety in Britain – Josef and Hermine Hupka fled via Zurich, where they were refused asylum, to Amsterdam. Their attempts to escape to Britain, South America or the USA came to nothing. After hiding in Bilthoven near Utrecht, they attempted in November 1942 to escape over the border to Belgium, but were unsuccessful. In spring 1944 they were arrested and taken to the Westerbork transit camp. From there they were deported in early April to Theresienstadt ghetto, where Josef Hupka perished on 23 April 1944. Hermine Hupka was deported to Auschwitz in October 1944 and murdered directly on arrival.
"The Marriage of Figaro", a portfolio with thirty pen drawings by Moritz von Schwind from Josef Hupka's collection, which was banned from export and sale and which after the annexation the Albertina was interested in, was forcibly sold in March 1939 to the Wiener Städtische Sammlungen. The Vienna Restitution Commission decided on 7 September 2004 that the sheets should be returned to Hupka's legal successors.