Lincoln was elected President in 1860 in a heated race that included three other major candidates. Lincoln was hated in the South, and following his election, the Southern states began secession procedures, beginning with South Carolina about six weeks after the election. Southern states believed that Lincoln intended to eliminate or restrict slavery, and this was one of the causes of the American Civil War that followed.
Lincoln's Emancipation Proclamation was an executive order that proclaimed the freedom of slaves in the seceding Southern states, which would take effect as the Union armies advanced and took control in those regions. Oddly, the Proclamation did not include the slaves in the existing Union slave states (among them Kentucky, Delaware, Maryland and Missouri); nor did the Proclamation make slavery illegal.
Lincoln was assassinated just five days after Lee's surrender at Appomattox Court House. Lincoln's killer, actor John Wilkes Booth, had originally formulated plans for Lincoln's kidnapping a year before, but he decided that murder was a better option after learning of Lincoln's plans to give Negroes equal voting rights.
Lincoln was elected in 1860 and inaugurated in March 1861. The significance of his election is that the South took it as an indication that there was to be no compromise. South Carolina seceded from the Union upon learning of his election.
The Emancipation Proclamation was issued to be effective January 1, 1863. Noble as it sounds, it freed no slaves, as it only freed slaves in states in rebellion. It actually exempted certain counties in Virginia and Parishes in Louisiana that were under Union control. It gave the North the moral high ground, and more importantly, prevented European Nations from recognizing the Confederacy and possibly supporting it.
The war ended in April 1865 and Lincoln was assassinated within days. There is no real connection there; the plan to assassinate him and several other government officials was under way long before Lee surrendered. The conspirators apparently thought that all was not yet lost.