On the formation of the Batavian Republic in 1795, Van Merlen transferred to the army of the new nation. He also moved from the infantry to the cavalry, though this necessitated a drop in rank, becoming a 1st Lieutenant in the Batavian Hussars on 10 July 1795. On 4 April 1798 he was promoted to "Ritmeester", a rank equivalent to captain. The following year, his regiment helped defeat the Anglo-Russian invasion of Holland, with Van Merlen fighting at Bergen, Alkmaar and Castricum.