At the beginning of 1864, Lincoln made Grant commander of all Union armies. Grant made his headquarters with the Army of the Potomac, and put Maj. Gen. William Tecumseh Sherman in command of most of the western armies. Grant understood the concept of total war and believed, along with Lincoln and Sherman, that only the utter defeat of Confederate forces and their economic base would bring an end to the war. This was total war not in terms of killing civilians but rather in terms of destroying homes, farms, and railroads. Grant devised a coordinated strategy that would strike at the entire Confederacy from multiple directions. Generals George Meade and Benjamin Butler were ordered to move against Lee near Richmond, General Franz Sigel (and later Philip Sheridan) were to attack the Shenandoah Valley, General Sherman was to capture Atlanta and march to the sea (the Atlantic Ocean), Generals George Crook and William W. Averell were to operate against railroad supply lines in West Virginia, and Maj. Gen. Nathaniel P. Banks was to capture Mobile, Alabama.

Union forces in the East attempted to maneuver past Lee and fought several battles during that phase ("Grant's Overland Campaign") of the Eastern campaign. Grant's battles of attrition at the Wilderness, Spotsylvania, and Cold Harbor resulted in heavy Union losses, but forced Lee's Confederates to fall back repeatedly. An attempt to outflank Lee from the south failed under Butler, who was trapped inside the Bermuda Hundred river bend. Grant was tenacious and, despite astonishing losses (over 65,000 casualties in seven weeks), kept pressing Lee's Army of Northern Virginia back to Richmond. He pinned down the Confederate army in the Siege of Petersburg, where the two armies engaged in trench warfare for over nine months.

Grant finally found a commander, General Philip Sheridan, aggressive enough to prevail in the Valley Campaigns of 1864. Sheridan defeated Maj. Gen. Jubal A. Early in a series of battles, including a final decisive defeat at the Battle of Cedar Creek. Sheridan then proceeded to destroy the agricultural base of the Shenandoah Valley, a strategy similar to the tactics Sherman later employed in Georgia.

Meanwhile, Sherman maneuvered from Chattanooga to Atlanta, defeating Confederate Generals Joseph E. Johnston and John Bell Hood along the way. The fall of Atlanta on September 2, 1864, guaranteed the reelection of Lincoln as president. Hood left the Atlanta area to swing around and menace Sherman's supply lines and invade Tennessee in the Franklin-Nashville Campaign. Union Maj. Gen. John Schofield defeated Hood at the Battle of Franklin, and George H. Thomas dealt Hood a massive defeat at the Battle of Nashville, effectively destroying Hood's army.

Leaving Atlanta, and his base of supplies, Sherman's army marched with an unknown destination, laying waste to about 20% of the farms in Georgia in his "March to the Sea". He reached the Atlantic Ocean at Savannah, Georgia in December 1864. Sherman's army was followed by thousands of freed slaves; there were no major battles along the March. Sherman turned north through South Carolina and North Carolina to approach the Confederate Virginia lines from the south, increasing the pressure on Lee's army.

Lee's army, thinned by desertion and casualties, was now much smaller than Grant's. Union forces won a decisive victory at the Battle of Five Forks on April 1, forcing Lee to evacuate Petersburg and Richmond. The Confederate capital fell to the Union XXV Corps, composed of black troops. The remaining Confederate units fled west and after a defeat at Sayler's Creek, it became clear to Robert E. Lee that continued fighting against the United States was both tactically and logistically impossible.