He returned to the War Office in 1851, was promoted major in 1853, and went to Morocco as private secretary to O'Donnell, who made him colonel in 1860, after Jovellar had been wounded at the battle of Wadel Ras.
Despite being severely wounded in fighting insurgents on the streets of Madrid, he rose to the rank of general of division in 1866.
In the autumn of 1873, Castelar sent him to Cuba as governor-general which he served from November 1873 – 1874 and June 1876–October 1878.
In 1874 Jovellar came back to the Peninsula, and afterwards and was in command of the Army of the Center against the Carlists when Arsenio Martínez Campos went to Sagunto to proclaim Alfonso XII.
Alfonso XII made him a captain-general, president of the council, life-senator, and governor-general of the Philippines (1883–1885).