The Union won the American Civil War. The war effectively ended in April 1865 when Confederate General Robert E. Lee surrendered his troops to Union General Ulysses S. Grant at Appomattox Court House in Virginia. The final surrender of Confederate troops on the western periphery came in Galveston, Texas, on June 2.