In 1798, Jourdan appointed him as chief of staff for the Army of Observation. Ernouf was with the Army of Observation when it crossed the Rhine river, in what British historians have called a violation of the Treaty of Campo Formio, resulting in the War of the Second Coalition. On 2 March, the Army was renamed Army of the Danube, and it marched to Upper Swabia, where it engaged Archduke Charles' Habsburg force at Ostrach on 21 March, and again on 25 March at Stockach. In both battles, the Habsburg manpower, superior to the French numbers by three to one and two to one respectively, overwhelmed the French lines; Jourdan, the commander of the Army, was unable to concentrate his forces sufficiently to counteract the Habsburg numbers, and withdrew to the Black Forest in late March. Ernouf took command of the Army of the Danube while Jourdan returned to Paris to request more troops. He was replaced as commander of the Army of the Danube by André Masséna, and served as Massena's chief of staff in the Swiss campaign of 1799, during which he saw action in Zurich and central Switzerland; he was again at Zurich for the French victory over Alexander Rimsky-Korsakov.