The election of 1864 saw the country in the middle of the civil war. Abraham Lincoln sought out a 2nd term as president. Instead of running as a Republican, he joined the War Democrats and other Republicans to form the National Union Party.
Except he kicked out Hannibal Hamlin as his Vice President/running mate.
Instead War-Governor of Tennessee Andrew Johnson, a southern war democrat who supported the Union was chosen as Lincoln's running mate.
The were some other Republicans who felt rather betrayed by what was happening. They called themselves the Radicals Republicans, and nominated John C. Fremont as their candidate. He eventually dropped out of the race in favor of the country's success in the civil war.
Even though Lincoln thought he might lose his election, the Democratic party was even more spilt internally on the War or Peace issue. Eventually moderate George B. McClellan, a military general got the Democratic nomination.
Ironically Lincoln's fears did not come true since he won in a landslide. The Democrats were not very popular in the North to begin with, and their internal struggle set them back. Not to mention Lincoln's popularity with soldiers and support from War Democrats came in with sweeping victory. He won 22 out of 25 states, beating McClellan 212 electoral votes to 21.