Oskar Hofmann was born on the 6th of March 1874 in Trieste as the son of a schoolmaster and following his graduation from the German gymnasium there entered the technical military academy in Vienna in 1891. Three years later he was commissioned as a Leutnant and assigned to the 41st divisional artillery regiment at Salzburg. After three years service at regimental duty, Hofmann attended the Kriegsschule from 1897 until 1899 being promoted to Oberleutnant on the 1st of November 1897 and was subsequently attached to the general staff and assigned to the 30th infantry division in Lemberg. On the 1st of February 1901 he returned to regimental duty as a Hauptmann in the 18th divisional artillery regiment in Eperjes and was further transferred to the 5th divisional artillery regiment at Brünn in April 1906. Four years later he was assigned as an instructor at the corps officers' school in Vienna and promoted to Major on the 1st of May 1913. At mobilization he returned as the 2nd division (battalion) commander in the 1st field artillery regiment in Generalmajor. Thaddäus Ritter Jordan-Rozwadowski v. Groß-Rozwadów's 12th field artillery brigade in Feldmarschalleutnant Paul Kestřanek's 12th infantry division itself immediately subordinate to the 1st army headquarters of General der Kavallerie Viktor Dankl.
During the first day of the battle of Krasnik, the 23rd of August 1914, the 12th infantry division was advancing on the western flank of the 1st army along the right bank of the Vistula river with the mission to secure the area Goscieradów-Annopol. Major Hofmann's division of three batteries was at first deployed between the villages of Goscieradów and Annopol in order to support the division's advancing infantry. Without either telephone or runner contact with his regiment or neighbouring units he had his division gallop forward into the most likely direction of the Russian advance and take up firing positions. By doing so he thereby successfully secured the extreme left flank of the 1st army with his division forcing a Russian withdrawal and facilitated the almost effortless advance of the 12th division's infantry. Without suffering a single casualty but with considerably lighter munitions wagons he led his division back from that first day of battle and was subsequently awarded the Military Order of Maria Theresia at the postwar 192nd promotion on the 11th of December 1925.
In appreciation of his continued exceptional leadership of his division he was given an accelerated promotion to Oberstleutnant on the 1st June 1915 having assumed command of an independent heavy howitzer division later heavy field artillery regiment number 11 in April 1915. He led this regiment until the following march when he was assigned as the head of the third department in the Austrian ministry of defence in which he served for the remainder of the war being promoted to Oberst on the 1st of November 1917. With the dissolution of the ministry at the war's end he was employed in the war ministry in the department responsible for the demobilization of the old Austro-Hungarian army and finally retired from military service on the 1st of October 1920.
Following the war he was employed as a senior civil servant and with the incorporation of Austria into Germany he was made an honorary Generalmajor (retired) of the German army on the 27th of August 1939. The general died in Vienna on the 14th of March 1964.
Generalmajor Hofmann was awarded the following decorations during his service: Knight's Cross of the Leopold Order with War Decoration,Order of the Iron Crown 3rd Class with War Decoration and Swords, Miltary Merit Cross 3rd Class with War Decoration and Swords, Bronze Military Merit Medal with War Decoration and Swords (Signum Laudis), Karl Troop Cross, Military Jubilee Medal 1898 and the Military Jubilee Cross 1908.