The war ended in spring of 1865 when Robert E. Lee surrendered the last major Confederate army to Ulysses S. Grant at Appomattox Courthouse on April 9, 1865.
Answer:
General Lee surrendered to General Grant at the Appomattox Court House in Virginia.