The Heiberg ancestry can be traced back to Norway, and has produced a long line of priests, headmasters and other learned men.
Heiberg also translated a publication by the French writer Jean-Charles Laveaux, which was highly critical towards the upper class.
His début novel Rigsdalersedlens Hændelser (1789) critically describes merchants, the nobility and the German influence on Denmark.
This novel highly angered the Danish upper class, but Heiberg kept writing similarly critical songs, articles, essays and plays (one play, Heckingborn, being translated into English in 1799 with the title Poverty and Wealth).
He had previously been given many warnings and fines for his works full of criticism of the government, but after new, harsher censorship laws were introduced by the crown prince Frederick in September 1799 he was accused and sentenced retroactively to banishment.