On the eve of the outbreak of hostilities with the United States, Torrejón commanded the 3rd Cavalry Brigade of Brigadier-General Mariano Arista's Army of the North, and on 24 April 1846 he forded the Río Bravo del Norte during the Mexican–American War. At Rancho Carricitos he attacked Captain Seth Thornton's two companies of American dragoons and defeated them in the "Thornton Affair", the start of the war between the U.S. and Mexico. His attempt to block the Point Isabel Road and to attack General Zachary Taylor's supply trains failed and in the 1847 Battle of Buena Vista his cavalry nearly drove the Americans back, but in doing so placed them in front of the American artillery. Torrejón participated in the battles for Mexico City soon after, covering the retreat of the Mexican army to defend the capital in the Battle of Contreras. He later engaged the Americans at San Cosme Gate.