By May 1865, Union forces had won most battles with the Confederates and the majority of Confederate troops had surrendered. However, some Confederate troops continued fighting for about seven weeks after Lee’s surrender at Appomattox Court House. The surrender of Confederate forces in Texas followed in June 1865. Officially, the war ended when the troops west of Mississippi led by Confederate General Edmund Kirby Smith surrendered.
The states which wanted to secede from the Union eventually accepted the terms of the winners, such as the passing of the 13th Amendment of January 1865, which ended slavery across the United States (including in the four Union slave states that had not been covered by the Emancipation Proclamation).
The official Proclamation of Peace was signed in August 1866 by Democrat President Andrew Johnson, after another Confederate rebellion in Texas.
Looking at the events in retrospect, it is believed that the Northern Union forces won the war because they had better naval forces, more soldiers, as well as more industrial and economic resources. Abraham Lincoln is also partly credited with the success of the Union forces because of his qualities as a political leader.
In general, it is estimated that t...