His early career was spent in the army and he served with Napoleon in Egypt. Thanks to Napoleon, he was a general by the age of 25, although he himself felt that he had risen too far in too short a time. Upon his return to France, he was involved in Napoleon's plot to overthrow the Directory. After becoming first consul, Napoleon arranged a marriage for Louis to Hortense de Beauharnais, the daughter of Empress Josephine and Napoleon's stepdaughter. Hortense, who was opposed to the marriage, was convinced by her mother to marry Louis for the sake of the family.