Lee decided he had too few soldiers to keep on fighting and he surrendered to Grant on April 9 , 1865 , near Appomattox Court House . Confederate resistance ended after Lee surrendered to Grant at Appomattox Court House on April 9 , 1865 .