On November 8, 1864, Abraham Lincoln was re-elected to a second term as President of the United States. His running mate was Andrew Johnson, U.S. Senator from Tennessee. Johnson bitterly and bravely opposed secession and refused to have anything to do with the Confederacy. Johnson belonged to the "War Democrats" who remained loyal to the Union. Although Lincoln was still a member of the Republican party, Johnson was selected to run with Lincoln on the "Union Party" ticket.
The Democratic party nominee was George B. McClellan, the Union general whom Lincoln fired twice during the Civil War for poor results, inaction, and disobeying of orders. McClellan and his fellow "Peace Democrats" wanted to end the war at any cost, even if it meant that the Union would remain dissolved.
Going into the 1864 campaign, it wasn't at all clear that Lincoln would win re-election. The war effort was going poorly for the North, with one general after another failing to win victories. People were horrified by the endless slaughter of soldiers from both sides. Eventually, the tide shifted in favor of the Union thanks to Generals Grant and Sherman.
In the end, Lincoln and Johnson won the election with a comfortable 55%-45% victory in the popular vote and a landslide in the Electoral College. It must be remembered that the states which were in the Confederacy did not vote in this election.