In 1862, Merritt was appointed captain in the 2nd Cavalry and served as an aide-de-camp to Brig. Gen. Philip St. George Cooke, who commanded the Cavalry Department of the Army of the Potomac. He served in the defenses of Washington, D.C., for the rest of 1862. In 1863, he was appointed adjutant for Maj. Gen. George Stoneman and participated in Stoneman’s Raid in the Battle of Chancellorsville in 1863.
In the Gettysburg Campaign, Merritt commanded the Reserve Brigade, 1st Division, Cavalry Corps of the Army of the Potomac. He was slightly wounded in the Battle of Brandy Station; soon after (June 29, 1863), he was appointed brigadier general of volunteers for his “gallant and meritorious service” at Brandy Station and Upperville. Being promoted directly from captain to brigadier general was an unusual step, even for the Civil War, but Merritt shared this honor on that date with Captain Elon J. Farnsworth and Captain George Armstrong Custer.
In the initial cavalry actions of the Battle of Gettysburg, Merritt saw no action; his reserve brigade guarded the lines of communications of the Army of the Potomac. On July 3, 1863, however, he participated in the assault ordered by division commander Brig. Gen. Judson Kilpatrick on the Confederate right flank, following Pickett’s Charge. His fellow general, Elon J. Farnsworth, was killed during this futile assault against infantry troops. Merritt took over command of the 1st Division of the Cavalry Corps following the death by typhoid fever of its commander, John Buford, in December 1863. Brig. Gen. Alfred Torbert was the initial commander of the 1st Division but was gone for most of Lt. Gen. Ulysses S. Grant’s Overland Campaign in 1864, so Merritt acted as commander in his place. He received a brevet promotion to lieutenant colonel in the regular army for his actions at the Battle of Yellow Tavern, the engagement in which Confederate cavalry commander Maj. Gen. J.E.B. Stuart was killed.
During Maj. Gen. Philip Sheridan’s Valley Campaigns of 1864, Merritt commanded the 1st Division, Cavalry Corps of the Army of the Shenandoah. Arriving at the opportune moment, his division routed the Confederate forces at the Third Battle of Winchester, a deed for which he received a brevet promotion to major general. He was second-in-command to Sheridan during the Appomattox Campaign and was one of several commissioners for the surrender at Appomattox Court House. He was brevetted major general in the regular army, in April 1865, for bravery at the Battle of Five Forks and the Appomattox Campaign.
In June 1865, Merritt was appointed command of Cavalry Forces of the Military Division of the Southwest, commanded by Sheridan. He led the 1st Division of Cavalry to march from Shreveport, Louisiana, to San Antonio, Texas, as part of the Union occupation forces on an arduous 33-day 600-mile march between July 9 and August 11, 1865. On January 28, 1866, Merritt was one of a number of brevetted generals mustered out of volunteer service and returned to their pre-war ranks in the regular army.