The Keystone Subdivision is a railroad line owned and operated by CSX Transportation in the U.S. states of Maryland and Pennsylvania. The line runs from Cumberland, Maryland, west to McKeesport, Pennsylvania, (near Pittsburgh) along a former Baltimore and Ohio Railroad (B&O) line. The line includes the well-known Sand Patch Grade over the Allegheny Mountains. 
The east end of the Keystone Subdivision is at Viaduct Junction in Cumberland, where it meets the Cumberland Terminal Subdivision at the east end of the Cumberland Viaduct. The west end is at Sinns, on the west (left) side of the Youghiogheny River at Liberty, where it continues as the Pittsburgh Subdivision through Pittsburgh and on to West Pittsburg. The Keystone Subdivision also joins with the S&C Subdivision at Rockwood, Pennsylvania.
The Pittsburgh and Connellsville Railroad (P&C) was first incorporated in 1837, but did not succeed in raising money until 1846. Work began in 1847, and the line opened from Pittsburgh to Connellsville in 1857 and to Cumberland in 1871. The B&O leased the P&C for 50 years effective January 1, 1876, and it was merged into the B&O in 1912.
A new bridge over the Youghiogheny River at Sinns opened in 1968, connecting the old P&C to the parallel Pittsburgh and Lake Erie Railroad (which the B&O had trackage rights over to New Castle) on the opposite shore. This allowed B&O trains to bypass downtown McKeesport; the B&O line through McKeesport was closed in 1970. The P&LE is now CSX's Pittsburgh Subdivision, while the old B&O tracks in the Pittsburgh area are mostly abandoned or operated by short lines.
In summer 1985, the Chessie System (the B&O's holding company at the time) announced that it would sever its St. Louis line through Ohio, rerouting all through traffic over the Alleghenies at Sand Patch rather than along the older Mountain Subdivision.
- Cumberland Terminal Subdivision
- Pittsburgh Subdivision
- P&W Subdivision
- S&C Subdivision
- List of CSX Transportation lines
|Wikimedia Commons has media related to Keystone Subdivision.|
- CSX Timetables: Keystone Subdivision
- http://www.multimodalways.org/docs/railroads/companies/CSX/CSX%20ETTs/CSX%20Baltimore%20Div%20ETT%20%234%201-1-2005.pdf CSX Baltimore Division Timetable
- Pittsburgh & Lake Erie Railroad 1960 System Map
- "PRR Chronology, 1837" (PDF). (98.8 KiB), June 2004 Edition
- "PRR Chronology, 1847" (PDF). (40.7 KiB), April 2005 Edition
- "PRR Chronology, 1857" (PDF). (54.1 KiB), March 2005 Edition
- "PRR Chronology, 1871" (PDF). (72.9 KiB), January 2005 Edition
- Baltimore and Ohio Railroad Timeline
- Bridges and Tunnels of Allegheny County, Pennsylvania: CSX Bridge at Liberty Boro
- Bridges and Tunnels of Allegheny County, Pennsylvania: P&LE Bridge McKeesport