Raub served with the 210th Pennsylvania Infantry Regiment during the Civil War as an assistant surgeon. On February 5, 1865, during the Battle of Hatcher's Run, Raub volunteered to tend wounded soldiers in the middle of severe gunfire and then took up arms himself and began to fight after noticing Confederate soldiers about to launch a surprise attack from a position his regiment was initially not prepared to defend. He received the Medal of Honor on April 20, 1896, some 31 years after his actions.