The northernmost section of the route was opened in stages by the fledgling York and North Midland Railway, a company which belonged to the railway empire of George Hudson. York to Sherburn Junction was completed in 1839 to form a link with the Leeds and Selby Railway, which was later taken over by the Y&NM. This section includes Ulleskelf, Church Fenton and Sherburn-in-Elmet stations, as well as the former station sites at Copmanthorpe and Bolton Percy. Y&NM extended the line to Altofts Junction in 1840 to meet the new North Midland Railway as part of a new route from York to London St Pancras via Normanton, Swinton, Chesterfield and Derby. Stations on this section were Milford, Monk Fryston and Burton Salmon, where the present route diverges. The next section, from Burton Salmon to Ferrybridge, was completed in 1850 to form a link between York and Knottingley; Ferrybridge station closed in 1965. From Ferrybridge, the route takes up the course of the Swinton and Knottingley Joint Railway, constructed in 1879. The first station encountered is Pontefract Baghill, which remains open today, before the line reaches a closed station at Ackworth then the station at Moorthorpe. The small hamlet of Frickley saw its station close in 1953, but two new stations at Thurnscoe and Goldthorpe were constructed in the 1980s. These are primarily served by Wakefield Line trains; the two Dearne Valley line trains a day pass through without stopping. Finally, the S&KJR's Bolton-on-Dearne station has remained open throughout. Beyond Bolton-on-Dearne the line joins the North Midland's route to the south, opened in 1840 and serving Swinton, a new station here replacing that closed in 1967 and Kilnhurst West. At Aldwarke Junction the route diverges from the North Midland via a junction constructed by British Rail and opened in 1965. Here it joins the former Manchester, Sheffield and Lincolnshire Railway line, part of a link between two branch lines opened many years earlier by the South Yorkshire Railway. This section once had stations at Parkgate and Aldwarke and at Rotherham Road, before reaching the former Rotherham Central re-opened, slightly nearer the College Road bridge, in 1987 by British Rail. Leaving Rotherham Central we take the "Holmes Chord", a single line to Holmes Junction where we take to the rails of the Sheffield & Rotherham company, which opened its line in 1838 and which once served Holmes, Meadowhall, Wincobank, Brightside and Attercliffe Road, before arriving at Sheffield. The section between Holmes Junction, adjacent to the station and Grimesthorpe Junction is the oldest section of the route.
Current services
Services which operate over the entire length of the route are provided by Northern Trains. Freight trains also regularly use the route. Northern services, which currently make just three round trips daily, from Sheffield to York calling at Meadowhall Interchange, Rotherham Central, Swinton, Moorthorpe, Pontefract Baghill, Sherburn-in-Elmet, Church Fenton and Ulleskelf. This service was more frequent in the 1970s and 1980s, but since a major round of cutbacks in 1991 the service frequency has gradually declined. The northern part of the route as far as Colton Junction is used by all Edinburgh to London King's Cross expresses, as well as the numerous CrossCountry, TransPennine Express and Northern York to Leeds workings which continue as far as Church Fenton. Sherburn-in-Elmet is served by some York–Selby/Hull trains which diverge from the route at Sherburn South Junction, but beyond this point the only passenger trains are the infrequent Sheffield–York local services, until Moorthorpe is reached. Overall, the effect of this is that there are only three departures in each direction from Pontefract Baghill per day, although there are two other stations in Pontefract. The line is however a busy freight artery and also a useful diversionary route, which ensures its continuing survival. In 2017, the section through Rotherham Central was adapted for use by Sheffield Supertram, the light rail network that operates within Sheffield. Supertram is operating a pilottram-train service over the route, testing the feasibility of such an operation. This is initially intended to run for two years, with an extension of the operation should it prove successful. It involved the construction of a new chord between the NationalRail line and Supertram's own network, with a tram platform built at and a short siding to serve the Rotherham Parkgate tram stop terminus with the extension electrified. It opened on 25 October 2018.