The inaugural run of the Baltimore and Ohio Railroad's Royal Blue from Washington, D.C., to New York City, the first U.S. passenger train to use electric locomotives.

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.