The Malmesbury Railway was closed completely from November 12, eleven years after it had lost its passenger services. This little line in North Wiltshire was probably unique in that its junction was changed from one main line to another of equal importance. When first built, the railway branched from the Paddington to Bristol line, and was otherwise isolated. Early this century, however, the Badminton line to South Wales was built, and its route crossed the Malmesbury line, but without physical connection. Eventually the branch was truncated and linked to the newer main line.
The first scheme to mention Malmesbury was that of the Wiltshire & Gloucestershire Railway. A meeting to discuss this project was held at Stroud in October, 1863. The line was to run from Christian Malford on the Great Western Railway four miles from Chippenham, up the valley of the Avon close to Malmesbury and Tetbury, and thence to Nailsworth. From Nailsworth it was to follow the course of the line sanctioned the previous year as far as Dudbridge. Thence it would diverge to the north and join the G.W.R. about a mile west of Stroud Station. The gradients were easier than those of the existing Stroud - Swindon line. The intended length of Wiltshire & Gloucestershire Railway was about 21 miles and it was expected to cost about £275,000.
An Act for a railway between Christian Malford and Nailsworth was duly passed in July, 1864. The directors of the Midland Railway agreed to work the line as a continuation of the Stonehouse & Nailsworth Railway, for it was one of their attempted inroads into G.W.R. territory. Salisbury was their objective, and to this end powers were obtained in July 1865, for the North & South Wiltshire Junction Railway, from Christian Malford to the Berks & Hants Extension Railway between Woodborough and Devizes.