Morillo returned to Spain, was named General Captain of New Castile, and supported the Liberal Constitution during the Liberal Triennium. He prevented a coup against the Constitution in 1822, and fought in 1823 the French invasion under Louis-Antoine, Duke of Angoulême in the north of Spain, where he was defeated.