The Banff, Macduff and Turriff Junction Railway connected the Aberdeenshire town of Turriff with the Great North of Scotland Railway's (GNSR) main line at Inveramsay. A separate company, the Banff, Macduff and Turriff Extension Railway, built extension to a station called Banff and Macduff. The junction railway, together with the junction station at Inveramsay, opened on 5 September 1857 and the extension opened on 4 June 1860. Both railways were absorbed by the Great North of Scotland Railway on 1 August 1866, and the line was extended 1⁄2-mile (0.80 km) to a new Macduff station in 1872.
Following the grouping in 1923, the line became part of London and North Eastern Railway and was nationalised, becoming part of British Railways. The Macduff branch closed to passengers on 1 October 1951, completely to the north of Turiff on 1 August 1961 and the remaining line on 3 January 1966.
This line was built to connect the coastal towns of Banff and Macduff with Aberdeen on the east coast of Scotland. It ran for 29 miles across the open Aberdeenshire countryside. The railway was opened as far as Turriff in 1857, then on to Gellymill, just outside Macduff, in 1860. It was finally taken into the town of Macduff itself in 1872. The Banff, Macduff and Turriff Railway Company was absorbed into the Great North of Scotland Railway network in 1866. Following the grouping in 1923, it became part of LNER. On nationalisation, in 1947, LNER itself was taken over by British Railways.