The eighteenth-century choice to locate UNC in a relatively sparsely populated area left the university and town stranded in the 1840s when railroad lines began to crisscross the state. The east-west line between Goldsboro and Greensboro bypassed Chapel Hill some eight miles to the north, which encouraged the later growth of Durham but isolated Chapel Hill. In 1873, while the university was closed, local iron mine owner Robert F. Hoke obtained a charter for the Chapel Hill Iron Mountain Railroad Company. When the university reopened two years later, trustees worked with Hoke to make the project happen. Renamed the State University Railroad, the project gained state support through the use of convict labor, and additional support through an agreement with the Richmond and Danville Railroad Company to provide iron and rolling stock. The line opened in 1881.
The Chapel Hill terminus was located two miles away from campus, at a spot known as West End, later to become the town of Carrboro. The line met the main line at a point midway between Durham and Hillsborough, marked now by University Station Road. Hoke never found it profitable to ship his iron ore by rail, but the West End depot quickly became a hub for new industry. In 1898 Thomas Lloyd built textile mills there, which Julian Carr bought in 1904.
Passenger service on the University Railroad line ended in 1940. About the same time, UNC purchased property at the west end of Cameron Avenue to build a power plant on the rail line. The current plant there, the Gore Cogeneration Facility, was completed in the early 1990s. Today the only rail traffic on the University Railroad line comes from the freight cars that deliver coal to the power plant.