Sweeny was born in Cork, Ireland, on Christmas Day, 1820. He immigrated to the United States in 1833. In 1846, he enlisted as a second lieutenant in the 2nd New York Volunteers, and fought under General Winfield Scott in Mexico. Sweeny was wounded in the groin at the Battle of Cerro Gordo, and his right arm was so badly injured at the Battle of Churubusco that it had to be amputated. For his heroics, his fellow servicemen nicknamed him "Fighting Tom". Despite this possibly career-ending injury, he continued serving with the 2nd US Infantry until the outbreak of the Civil War. Sweeny was active in the Yuma War (1850–1853), fighting in several engagements against native Americans.