
For Lincoln, his highs and lows in popularity were almost certainly tied to events connected with the war. At the outset of the war, many on the Union side believed that it would be a matter of short duration and that the south would quickly be brought in line. This illusion was quickly shattered after the Union loss at the First Battle of Bull Run (also known as the First Battle of Manassas), fought on July 21, 1861. Responding to to political pressure, Brigadier General Irvin McDowell led his unseasoned Union Army across Bull Run against the equally inexperienced Confederate Army of Brigadier General Pierre Gustav Toutant Beauregard camped near Manassas Junction. McDowell planned for a surprise flank attack on the Confederate left. But the attack was poorly executed. Confederate reinforcements commanded by Brigadier General Joseph E. Johnston arrived from the Shenandoah Valley by railroad, and the course of the battle quickly changed in the Confederate's favor. A brigade of Virginians under Thomas J. Jackson held its ground, resulting in Jackson receiving his famous nickname, "Stonewall". The Confederates launched a strong counterattack, and as the Union troops began withdrawing and their retreat turned into a rout.
Lincoln's plans for early victory were further thwarted by a slowness to act on the part of General George McClellan, who was openly disrespectful to his commander-in-chief at times. Lincoln replaced commanders of the Army of the Potomac several times, without achieving the results he desired. The mid-term elections in 1862 led to severe losses for the Republicans because of public discontent with the administration over its failure to deliver a speedy end to the war, as well as rising inflation, new high taxes, rumors of corruption, the suspension of habeas corpus, the military draft law, and fears that freed slaves would undermine the labor market. The Emancipation Proclamation was announced in September, and while this gained votes for the Republicans in the rural areas of New England and the upper Midwest, it lost votes in the cities and the lower Midwest and raised concerns about the border states and whether some of them would join the Confederacy. Democrats were energized and did especially well in Pennsylvania, Ohio, Indiana, and New York. The Republicans held their majorities in Congress and in the major states, except New York. One newspaper, the Cincinnati Gazette, wrote that voters were "depressed by the interminable nature of this war, as so far conducted, and by the rapid exhaustion of the national resources without progress".
The war was still being waged as Lincoln faced reelection in 1864. Lincoln was a master politician, and had been able to hold together most of the factions of the Republican Party. He even brought War Democrats such as Edwin M. Stanton and Andrew Johnson into his coalition. Lincoln used patronage to keep his party together and fend off efforts by Radicals to drop him from the 1864 ticket. At the 1864 Republican convention, the Republican Party selected Johnson, a War Democrat from the southern state of Tennessee, as Lincoln's running mate. To increase his chances of re-election, Lincoln ran under the label of the new Union Party.
But it was prior to the 1864 election when even Lincoln believed that he would not be re-elected. General Ulysses Grant's 1864 spring campaigns turned into bloody stalemates with large numbers of Union casualties with little to show for them. Many Republicans across the country believed that Lincoln would be defeated. Lincoln shared in this fear. In the summer of 1864, Lincoln wrote and signed a pledge. He sealed it in an envelope and asked his cabinet members to sign the envelope as well, but he did not show them the envelope's contents. That pledge read as follows:
This morning, as for some days past, it seems exceedingly probable that this Administration will not be re-elected. Then it will be my duty to so co-operate with the President elect, as to save the Union between the election and the inauguration; as he will have secured his election on such ground that he cannot possibly save it afterward.
Lincoln's opponent in the election was none other than George McClellan. McClellan supported the war and repudiated his party's peace platform. Lincoln's political bacon was saved by a turn in the tide of the war in the Union's favor in the fall of 1864. General William Tecumseh Sherman's capture of Atlanta in September and Admiral David Farragut's capture of Mobile gave cause for optimism that the end of the war was in sight. This caused a split in the Democratic Party. By contrast, the National Union Party was united. On November 8, Lincoln was re-elected in a landslide, carrying all but three states, and receiving 78 percent of the Union soldiers' vote.
On March 4, 1865, Lincoln delivered his second inaugural address in which he famously said:
Fondly do we hope—fervently do we pray—that this mighty scourge of war may speedily pass away. Yet, if God wills that it continue, until all the wealth piled by the bond-man's 250 years of unrequited toil shall be sunk, and until every drop of blood drawn with the lash, shall be paid by another drawn with the sword, as was said 3,000 years ago, so still it must be said, "the judgments of the Lord, are true and righteous altogether". With malice toward none; with charity for all; with firmness in the right, as God gives us to see the right, let us strive on to finish the work we are in; to bind up the nation's wounds; to care for him who shall have borne the battle, and for his widow, and his orphan—to do all which may achieve and cherish a just and lasting peace, among ourselves, and with all nations.
By the spring of 1865 it became apparent that the war would soon be over. Robert E. Lee's army had thinned out due to desertion and casualties. One last Confederate attempt to break the Union hold on Petersburg failed at the decisive Battle of Five Forks on April 1. The Union now controlled the entire perimeter surrounding Richmond-Petersburg, completely cutting it off from the Confederacy. The Confederate capital fell to the Union XXV Corps, composed of African-American troops. The remaining Confederate units fled west after a defeat at Sayler's Creek. Lee had planned to regroup at the village of Appomattox Court House. When Lee's army reached Appomattox Court House, they were surrounded. After an initial battle, Lee decided that the fight was now hopeless, and surrendered his Army of Northern Virginia on April 9, 1865, at the McLean House.
In early April of 1865, Lincoln visited Virginia and on April 4th and 5th he spent time in the city of Richmond. Author Doris Kearns Goodwin describes Lincoln's visit to Richmond in her book Team of Rivals at pages 718-19:
No sooner had the presidential party reached the landing than Lincoln was surrounded by a small group of black laborers shouting "Bless de Lord!... dere is de great Messiah!... Glory Hallelujah!" First one and then several others fell to their knees. "Don't kneel to me," Lincoln said, his voice full of emotion, "that is not right. You must kneel to God only and thank Him for the liberty you will hereafter enjoy." The men stood up, joined hands, and began to sign a hymn. The streets, which had been "entirely deserted," became "suddenly alive" with crowds of black people "tumbling and shouting, from over the hills and from the water-side."
An ever-growing crowd trailed Lincoln as he walked up the street. "It was a warm day," Admiral Porter noted, and Lincoln, whose tall figure "overtopped every man there," was easily visible. From the windows of the houses along the two mile route, hundreds of white faces looked on with curiosity at the lanky figure "walking with his usual long, careless stride, and looking about with an interested air and taking in everything."

Lincoln would not have long to enjoy his new-found popularity. On April 14, 1865, five days after the surrender of Confederate general Robert E. Lee, Lincoln was shot by Confederate sympathizer John Wilkes Booth and died the next day.