Mansfield attended West Point and graduated in 1822, ranked 2 out of 40 in his class. He was commissioned a 2nd lieutenant in the U.S. Army Corps of Engineers. Advancement came slowly in the peacetime Army and he was promoted to 1st lieutenant in 1832 and to captain in 1838.
In the Mexican War, he received a brevet promotion to major for the action
at Fort Brown, Texas, on May 9, 1846. He was wounded in the leg at the battle of Monterrey, and he received a brevet promotion to Lieutenant Colonel for his actions there. He was brevetted to Colonel for the battle of Buena Vista in 1847. After the war he was promoted to Colonel and Inspector General of the U.S. Army on May 28, 1853.
At the start of the Civil War, Mansfield commanded the Department of Washington and promoted to Brigadier General on May 14, 1861. He was stationed at Hatteras Inlet, North Carolina, in October, following the battle fought there by Major Gen. Benjamin F. Butler in August. He was a brigade commander in the Department of Virginia from March to June of 1862. His only combat activity during this period was the firing of coastal batteries from Hampton Roads against the ironclad CSS Virginia in its naval battle against the USS Monitor. Until last fall, he commanded the Suffolk Division of the VII Corps of the Department of Virginia in the vicinity of Suffolk.
During the Maryland Campaign, when Confederate Gen. Robert E. Lee invaded the North for the first time, Mansfield was given command of the XII Corps of the Army of the Potomac, 2 days prior to Antietam. He arrived in the camp with 40 years of army experience, but no recent combat. He was white-haired and white-bearded, but had a vigorous manner that belied his age. His officers considered him nervous and fussy, but his men, many of whom were new recruits, liked him well enough due to his shows of blustery enthusiasm and fatherly assurance.
On the morning of September 17, the I Corps under Major Gen. Joseph Hooker attacked from the north, parallel to the Hagerstown Turnpike, smashing into the Confederate left flank. Mansfield's corps came immediately behind. As the lead brigade moved through an open field east of the Miller farmstead, they were subjected to fire by Confederate gunners, who took a terrible toll on the soldiers. The troops were advancing in column formation and their officers ordered deployment into open battle lines. He countermanded these orders, insisting they stay in column, because he was concerned that outside of the immediate control of their officers, the men would break and run. The result of this was to improve the mass of men that descended on the Confederate lines.
Mansfield personally led troops on his left flank in the East Woods. He returned to the rear to bring up more troops, and when he reached the line, he saw soldiers firing into the woods. He, assuming that men from Hooker's corps were in the woods, rode down the regimental line crying out, "You are firing on our own men!" The soldiers convinced him that they were not and were receiving heavy fire from the woods. He replied, "Yes, yes, you are right," and just then his horse was hit and a bullet caught him squarely in the stomach.
He was able to dismount and lead his horse to the rear before he collapsed. He was taken to a field hospital at the George Line Farm, where he died the next morning. He is buried in Indian Hill Cemetery, Middletown, Connecticut, and received a posthumous promotion to major general, backdated from July 18, 1862, for his gallantry at Antietam.
Brigadier General USA- May 14, 1861
Major General USV- July 18, 1862
Department of Washington (April 28, 1861- March 15, 1862)