Born the son of Avallon bookseller Henry Habert in Franche-Comté on 22 December 1773, Habert joined the French army on 1 September 1792 at the start of the War of the First Coalition. Quickly named captain of the 4th battalion of Yonne volunteers, within two years he rose to become a chef de bataillon (major) in the 107th Demi-Brigade. The year 1796 found him serving in the 3rd Foreign Demi-Brigade. He went with Lazare Hoche's abortive expedition in support of the Irish Rebellion of 1798. Captured by the British, he spent a number of months as a prisoner before being released. Sent to Egypt with dispatches, his ship evaded the British naval blockade and he was appointed aide-de-camp to Jacques-François Menou. He distinguished himself at the Battle of Heliopolis on 20 March 1800. On 21 March 1801, Menou appointed him an acting general of brigade after his actions at the Second Battle of Abukir. He returned to France after the Capitulation of Alexandria.