During the government of Baldomero Espartero, he was involved in a military conspiracy of supporters of Maria Christina, which tried to seize power in Madrid on 7 October 1841, but failed.
After two years in exile, he became a member of the Cortes, and in 1846, he was appointed Minister of Navy for a few weeks, then in 1848, he became Captain General of Madrid.
He founded the Royal Academy of Belles Letters in Puerto Rico, and banned the new dance Merengue for its "corrupting influence".
During the 1868 Revolution, he defended the monarchy of Isabella II of Spain, and as a consequence of the defeat, he was then marginalized from important positions under the reign of Amadeo I and under the First Republic.
He dedicated the last 30 years of his life to literature, and translated several works, including the Portuguese epic poem Os Lusíadas of Luís de Camões, and the Divine Comedy of Dante.