Placed in temporary command of the 1st Brigade in David Twiggs's division, Harney fought with distinction at the Battle of Cerro Gordo and received a promotion to brevet brigadier general. He returned to cavalry command during the Battle of Contreras, the Battle of Churubusco, and the Battles for Mexico City. However, he was accused of mistreatment of captured prisoners from the St. Patrick's Battalion, which included US Army deserters and escaped slaves. Harney became an original member of the Aztec Club of 1847, which was composed of American officers who had served in Mexico.