Warner agreed to an offer by the
State of Vermont to lead a volunteer regiment was then and he was appointed
colonel on September 1, 1862, and assigned to command the
11th Vermont Infantry (also known as the 1st Artillery, Vermont Volunteers). His regiment was assigned to the northern defenses of Washington, D.C., from September 1862 until May 1864, when
Lt. Gen. Ulysses S. Grant called for more troops to support his
Overland Campaign. The 11th Vermont joined the
Vermont Brigade after the
Battle of the Wilderness, and first saw action at the
Battle of Spotsylvania Court House. In his first engagement, on May 18, 1864, Warner was severely wounded, but refused to leave the field until the end of the day. He was sent home on furlough to recover. He returned from convalescence leave on July 8, 1864, and was assigned to command the 1st brigade, Hardin's division,
XXII Corps, in the defense of Washington. He returned to his regiment later that month, but was reassigned to command the 1st Brigade, 2nd Division,
VI Corps in September 1864. He commanded that brigade until it was disbanded in May 1865. On January 31, 1865, President Abraham Lincoln nominated Warner for appointment to the grade of
brevet brigadier general, Volunteers, to rank from April 1, 1864, "for gallant and meritorious service" at the battle of Spotsylvania Court House, and at the battles of
Winchester,
Fisher's Hill and
Cedar Creek. The
United States Senate confirmed the appointment on February 14, 1865. Warner was then promoted to captain, 8th U.S. Infantry, in the
Regular Army on October 8, 1864. He also received brevets as major, lieutenant colonel and colonel, U.S. Army, to rank from March 13, 1865, "for gallant and meritorious service during the war." Warner was appointed brigadier general, volunteers, on May 8, 1865, to rank from May 8, 1865, although his nomination to this grade was sent to the U.S. Senate only on January 13, 1866 and was confirmed by the Senate on February 23, 1866. On July 17, 1866, President
Andrew Johnson nominated Warner for appointment to the grade of brevet brigadier general, U.S. Army, to rank from April 9, 1865, "for gallant and meritorious services in the field during the war" and the U.S. Senate confirmed the appointment on July 23, 1866. He mustered out of voluntary service on January 1, 1866, and resigned his Regular Army commission on February 13. ==Postwar activities==