Cady fought in the Mexican–American War from 1846 to 1848. He participated in the Siege of Veracruz, March 9–29, 1847; the Battle of Cerro Gordo, April 17–18, 1847; Skirmish of Amazoque, May 14, 1847; Capture of San Antonio, August 20, 1847; the Battle of Churubusco, August 20, 1847; and the Battle of Molino del Rey, September 8, 1847, where he was wounded. Captain Cady commanded one of the five parties of one hundred U.S. soldiers each who stormed the flour mill at the Battle of Molino del Rey but who were repulsed with numerous casualties.