The war effectively ended on April 9, 1865, when Confederate General Lee surrendered to Union General Grant at Appomattox Court House. Confederate generals throughout the southern states soon followed suit and the last surrender occurring on June 23. President Andrew Johnson officially declared victory on May 9, 1865.