After the Restoration, Baudin was forced into retirement, and in 1816 joined the merchant marine. Under the July Monarchy, however, he returned to military service. In 1838, he became a Rear Admiral and became Commander-in-Chief of the squadron sent to Mexico during the so-called "Pastry War." In this conflict he commanded the French forces at the Battle of Veracruz on 27 November 1838, against the fort of Vera Cruz, San Juan de Ulúa. The fort gave itself up the next day.