The U.S. Military Railroads rebuilt the Souths railroads in the closing months of the war. African American railroad workers cut timber, broke rock, and hauled gravel for the grading. Their experience on the railroads as trackmen and laborers, as well as firemen and brakemen, continued after the war. In 1880 over 50 percent of all railroad workers in Virginia were black; in Pennsylvania, by contrast, railroad workers were almost uniformly white.
Source: From "Report of Services Rendered by the Freed People to the United States Army, in North Carolina in the Spring of 1862 After the Battle of New Bern"