Assigned next to the war-ending Appomattox Campaign, Anderson and the 1st West Virginia Cavalry fought in the battles of Dinwiddie Court House (March 31), Five Forks (April 1) and Sailor's Creek (April 6) during the early spring of 1865. It was at this juncture that Anderson performed the act of valor which resulted in his being awarded the U.S. Medal of Honor on May 3. While fighting as a corporal with the 1st West Virginia Cavalry in the Battle of Appomattox Station on April 8, he captured the flag of a Confederate States Army regiment. He was then also present with his regiment for the Battle of Appomattox Court House (April 9).