Having entered the Spanish army as a cadet, in February 1793 he became an alférez and participated in the War of the Pyrenees under general Antonio Ricardos, against the French.
Later, Milans del Bosch participated in the Peninsular War of 1807–1814, commanding irregular Catalan and Valencian mountain light troops—the Migueletes—in Catalonia.
After Iberia's independence and the return of an absolute monarchy under Ferdinand VII, Milans del Bosch sided with the liberals.
In 1817, Milans del Bosch and General Luis de Lacy organized a pronunciamento (which differs from the coup d'êtat because of its open declaration of opposition to an incumbent government).
Lacy was promptly arrested and sentenced to death, forcing Milans del Bosch to flee.