As commander-in-chief, Lincoln was able to control an uncertain election to some extent. Nevada was admitted to the Union only a week before the election, as a safety set of votes should Lincoln need them in the electoral college. Regarding the popular vote, extensive provisions were made for soldiers to vote at front, and whole regiments were given leave to return home to the polls. Proclaiming their confidence in his command and acting as a key bloc of voters across the country, the military vote went strongly in favor of Lincoln.
Once Lincoln's re-election was secure, the Union kicked their endgame into gear, launching an all out assault of total warfare. Sherman and his forces left Atlanta burning in their wake and embarked on a cataclysmic march to the sea, laying waste to a wide swath of the Georgia countryside as they went. After five surreal weeks of pillaging and looting, accompanied by deserters and hangers-on of various stripes, Sherman arrived at Savannah on December 13, capturing a Confederate fort there before joining up with the Union's naval blockade.
Following Sherman's lead in the western theater, Confederate forces led by General John Bell Hood made a quixotic march-and-fight push north all the way to Nashville, where they were finally defeated in December. Meanwhile, having accomplished his mission in the deep south, Sherman turned his attention back toward the home front. Upon the new year, Sherman marched north through South Carolina, burning his way through the state. Union reprisals were especially merciless, given South Carolina's role as the instigator of secession. The capital city was burned to the ground in mid-February, and in March Sherman entered North Carolina, rejoining Union forces at the coast later that month.
In the opening months of 1865, several armistice discussions took place. Lincoln found himself in no mood to negotiate, however, and talks with the rebels were repeatedly dropped. Instead, Lincoln spent a fortnight on the front with Grant, and met together with Grant and Sherman in late March to discuss peace terms.
By this time, the possibility of a complete surrender loomed quite large for the Confederacy. Their final desperate attempt to defend Richmond ultimately collapsed on April 2, when Grant pushed through the line at Petersburg. The next day, with Richmond burning, Davis and other Confederate leaders fled south. Meanwhile, Lincoln marched victoriously through the ruined city.
Less than a week later, Lee would surrender to Grant at a small farm near Appomattox Court House in south central Virginia. Lincoln had given Grant the authority to provide generous terms of surrender, which Lee graciously accepted. There would be little talk of such things as war criminals or executions: a remarkable occurrence in the aftermath of a such a bloody civil war. In just under four years of fighting, a combined 200,000 men were killed in battle, and half a million others died of various diseases. And yet, after all these casualties, the most profound loss to the nation was yet to come.