After rioting by Baltimore and Ohio Railroad workers and the deaths of nine rail workers at the hands of the Maryland militia, workers in Pittsburgh, Pennsylvania, stage a sympathy strike that is met with an assault by the state militia.

The Great Railroad Strike of 1877, sometimes referred to as the Great Upheaval, began on July 14 in Martinsburg, West Virginia, after the Baltimore and Ohio Railroad (B&O) cut wages for the third time in a year. This strike finally ended some 69 days later, after it was put down by unofficial militias, the National Guard, and federal troops. Because of economic problems and pressure on wages by the railroads, workers in numerous other cities, in New York, Pennsylvania and Maryland, into Illinois and Missouri, also went out on strike. An estimated 100 people were killed in the unrest across the country. In Martinsburg, Pittsburgh, Philadelphia and other cities, workers burned down and destroyed both physical facilities and the rolling stock of the railroadsengines and railroad cars. Local populations feared that workers were rising in revolution such as the Paris Commune of 1871.

At the time, the workers were not represented by trade unions. The city and state governments were aided by unofficial militias, the National Guard, federal troops and private militias organized by the railroads, who all fought against the workers. Disruption was widespread and at its height, the strikes were supported by about 100,000 workers. With the intervention of federal troops in several locations, most of the strikes were suppressed by early August. Labor continued to work to organize into unions to work for better wages and conditions. Fearing the social disruption, many cities built armories to support their local National Guard units; these defensive buildings still stand as symbols of the effort to suppress the labor unrest of this period.

With public attention on workers' wages and conditions, the B&O in 1880 founded an Employee Relief Association to provide death benefits and some health care. In 1884, it established a worker pension plan. Other improvements were implemented later.

The Baltimore and Ohio Railroad (reporting marks B&O, BO) was the first common carrier railroad and the oldest railroad in the United States, with its first section opening in 1830. Merchants from the city of Baltimore, which had benefited to some extent from the construction of the National Road early in the century, wanted to continue to compete for trade with trans-Appalachian settlers with the Albany-Schenectady Turnpike built in 1797, and the newly constructed Erie Canal, opened in 1825, (both of which served New York City), another canal being proposed by Pennsylvania (which would have connected Philadelphia and Pittsburgh), the Chesapeake and Ohio Canal (C&O, which connected to the nation's capital, Washington, D.C., although it never reached Ohio), and the James River Canal, which directed traffic toward Richmond and Norfolk, Virginia. At first, the B&O was located entirely in the state of Maryland, its original line extending from the port of Baltimore west to Sandy Hook (opened in 1834). There it connected with Harper's Ferry (by boat, then by the Wager Bridge) across the Potomac into Virginia, and also with the navigable Shenandoah River.

Because of competition with the C&O canal for trade with coal fields in western Maryland, the railroad could not use the C&O right-of-way west of Harpers Ferry. Thus, to continue westward through the Appalachian Mountains, the B&O chose to build the B & O Railroad Potomac River Crossing (1837) at Harpers Ferry, Virginia (since 1863, West Virginia). The line continued through Virginia to a point just west of the junction of Patterson Creek and the North Branch Potomac River, where it crossed back into Maryland to reach Cumberland (1842), connecting with the National Road, the main route westward. It reached the Ohio River at Moundsville, Virginia (1852), Wheeling (1853), where it built a terminus, and a few years later (1857) also to Parkersburg, Virginia, below rapids which made navigation difficult during parts of the year. It proved crucial to Union success during the American Civil War, although the conflict also caused considerable damage and repair costs. After the war's end, the B&O consolidated several feeder lines in Virginia and West Virginia, as well as expanded westward into Ohio (including a junction at Portsmouth), Indiana, and Illinois. B&O advertising later carried the motto: "Linking 13 Great States with the Nation."

After several mergers, the B&O became part of the CSX Transportation (CSX) network. The B&O also includes the Leiper Railroad, the first permanent horse-drawn railroad in the U.S. At the end of 1970, the B&O operated 5,552 miles of road and 10,449 miles of track, not including the Staten Island Rapid Transit (SIRT) or the Reading and its subsidiaries. It includes the oldest operational railroad bridge in the United States.

When CSX established the B&O Railroad Museum as a separate entity from the corporation, it donated some of the former B&O Mount Clare Shops in Baltimore, including the Mt. Clare roundhouse, to the museum, while selling the rest of the property. The B&O Warehouse at the Camden Yards rail junction in Baltimore now dominates the view over the right-field wall at the Baltimore Orioles' current home, Oriole Park at Camden Yards.

Part of the B&O Railroad's immortality has come from being one of the four featured railroads on the original version of the board game Monopoly; it is the only railroad on the board that did not directly serve Atlantic City, New Jersey, the city which the places and names the Monopoly's original edition were named after.