Patterson was commissioned a major general of volunteers at the outbreak of the Mexican–American War and commanded the 2nd Division, Army of Occupation, during the Tampico Expedition. He was considered for command of the expedition to Veracruz which eventually went to Winfield Scott. He was, however, placed in command of the expedition's Volunteer Division and saw action during the Siege of Veracruz and at the Battle of Cerro Gordo, where he was wounded. He led the American pursuit of the Mexican Army and was the first to enter Jalapa. While the U.S. Army was stationed at Jalapa, Patterson returned to the U.S. with other volunteer units whose enlistment time had expired. He then resumed his business interests in Pennsylvania, where he acquired 30 cotton mills and became quite wealthy. Patterson became one of the largest mill-owners in the United States and heavily involved in sugar refineries and cotton plantations. He again was an influential figure in Philadelphia politics.