Lying about his age, in May 1861, in order to join the army, Crawford enlisted in the 71st Pennsylvania Infantry Regiment, fighting in many actions as part of the Army of the Potomac, including the Battle of Antietam and the Battle of Fredericksburg. Wounded in the Second Battle of Fredericksburg in spring 1863, Crawford was sent to Philadelphia to convalesce. During his recovery, he attended the first officer training school designed to train white officers assigned to command U.S. Colored Troops. Returned to duty in June 1864, just in time to be mustered out with the rest of the 71st Pennsylvania Regiment, Crawford and brothers Charles and Zachary all reenlisted in the 197th Pennsylvania Infantry. Crawford received his appointment as a first lieutenant with the colored troops, but was not reassigned until September 1864. The war's ending found Crawford assigned to the 13th Colored Artillery in Bowling Green, Kentucky.