In 1846, he enlisted as a second lieutenant in the 2nd New York Volunteers, and fought under General Winfield Scott in Mexico.
In reply to efforts of Confederate sympathizers to induce him to surrender that important post, he declared that before he would do so, he would blow it up.
As second in command, he participated in the capture of Camp Jackson in May 1861 and later assisted in organizing the Home Guard.
In 1866, he commanded the ill-fated Fenian invasion of Canada, after which he was arrested for breaking neutrality laws between the United States and Britain, but was soon released.
He was reinstated with his former rank of major later that year, and retired from the regular army in May 1870 as a brigadier general.