Ulysses S. Grant fought against Robert E. Lee.
American Civil War . The Union finally won the war when General Robert E. Lee surrendered to General Ulysses S. Grant at the battle of Appomattox , which triggered a series of surrenders by Confederate generals throughout the southern states . Ulysses S. Grant . As Commanding General ( 1864 -- 69 ) , Grant worked closely with President Abraham Lincoln to lead the Union Army to victory over the Confederacy in the American Civil War . Grant confronted Robert E. Lee in a series of bloody battles , trapping Lee 's army in their defense of Richmond . In April 1865 , Lee surrendered to Grant at Appomattox , effectively ending the war .