After graduating in machine engineering in 1890, he was hired as a draftsman in the Norwegian State Railways. In 1895 he was promoted to constructor. In 1899 he left the State Railways to become managing director of the manufacturing company Skabo Jernbanevognfabrik. As indicated by the name, the company produced tramcars, but also chassis for buses and trucks, as well as the first Norwegian-built trolleybus.[1]
From 1906 to 1912 he chaired the Federation of Norwegian Manufacturing Industries.[1] In 1907 the Federation negotiated Norway's first collective bargaining agreement with the trade union Norwegian Union of Iron and Metalworkers.[3] Heiberg became a member of the central committee of the Norwegian Employers' Confederation. He later chaired the organization from 1912 to 1917. He was also a member of Aker municipal council from 1901 to 1903.[1]
In 1924 Heiberg left Skabo to become director-general of the Norwegian State Railways, a position he held until 1938.[4] From 1924 to 1934 he also chaired Standards Norway. The State Railways were haunted by economic problems during his time as director, owing to the general economic hardships of the interwar period, and for the first time in its history the State Railways had to discontinue parts of its service.[1] Passenger traffic were closed at the Vestmarka Line in January 1931, and in July 1933 the Sperillen Line and the Randsfjorden Line followed (passenger traffic at the Randsfjorden Line would return between 1944 and 1968). In addition, several private lines became defunct altogether.[5]
Heiberg was decorated as a Commander of the Royal Norwegian Order of St. Olav, the Swedish Order of the Polar Star, the Danish Order of the Dannebrog and the Finnish Order of the White Rose. He died in November 1939 in Oslo.[1]