Wainwright was commissioned a major in the 1st New York Artillery on October 17, 1861, and served throughout the war as an artillery officer in the Army of the Potomac.
Wainwright was chief of artillery of I Corps at the Battle of Chancellorsville.