He first participated in the Invasion of Portugal (1807) alongside the French army, but then deserted to join the Spanish resistance during the War of Independence, unlike his father who took part in the commission that drafted the Bayonne Statute.
[2] Upon the return of King Ferdinand VII, in 1814 and already with the rank of Colonel, he advocated that the Monarch swear the oath of the Spanish Constitution of 1812.
He unsuccessfully tried to negotiate with the European Absolutist powers (Austria, Prussia and Russia) to withdraw their support for the Carlists, who were fighting in favor of Fernando VII's brother, Carlos María Isidro.
Although he managed to control the insurrection of Luis Fernández de Córdova in Seville, he was unable to face the opposition in the Cortes and was forced to resign on 8 December 1838.
The Academy published his Poetic Works in 1857, with a prologue by the Duke of Rivas and a biographical and critical study by Mariano Roca de Togores.