Carrillo returned from his post as a territorial congressman in Mexico with the news that his brother, Carlos, had been appointed governor of Alta California to replace Alvarado, and that the capital had been changed from Monterey to Los Angeles.
During the Siege of Los Angeles, Carrillo, along with Captain José María Flores and Andrés Pico, formed a militia to defend Alta California during the Mexican–American War.
Carrillo distinguished himself by leading fifty Californio Lancers to victory at the Battle of Dominguez Rancho[6] against 203 United States Marines; killing 14, and wounding several others, while not suffering a single casualty.
Commodore Robert F. Stockton, leader of the US Pacific Naval Fleet, was so taken aback by the strong resistance of the Californios that he immediately set sail for San Diego to regroup.
With American forces totaling 660 soldiers and marines, they fought 150 Californios, led by José María Flores, with Carrillo second in command, in the Battle of Rio San Gabriel.