In the middle of the nineteenth century the counties of Galloway, Wigtownshire and Kirkcudbrightshire (now all part of the administrative region of Dumfries and Galloway) were devoted to agriculture but lacked efficient land communications links with the rest of the United Kingdom. Mail from the northern part of England and Scotland to Ireland passed this way through the ports of Portpatrick and Donaghadee, but the poor roads made the passage difficult.[1]
The Glasgow, Dumfries and Carlisle Railway (GD&CR) was authorised in 1846, and the authorisation appears to have included a branch from Dumfries to Kirkcudbright, but the shortage of money at that time led to abandonment of the plans for the branch.[2][3]
The line opened on 7 November 1859 and was immediately commercially successful; the preference share dividend was paid in full, and sufficient surplus enabled a 1% dividend to be paid on ordinary shares in the first full year. The line was operated from the outset by the G&SWR.[1]
In 1861 the Portpatrick Railway completed a connection from Castle Douglas to Stranraer and Portpatrick, and through traffic ran from Carlisle and points south and east over the CD&DR line.
The Castle Douglas and Dumfries Railway was amalgamated with the Glasgow and South Western Railway on 1 August 1865, by the terms of the G.&S.W.R. Amalgamation Act of 5 July 1865.[3]
The station was closed for passenger traffic on 1 March 1939[4] but trains continued to pass the station until the line was substantially closed, under the Beeching Axe, on 14 June 1965.[5] The section between Maxwelltown and Dumfries remained open to serve an oil depot, but this section of line was subsequently closed and lifted and is a cycleway/footpath.