At the mouth of the Manawatu River, the settlement of Foxton was seen in the 1860s as a possible port for the Manawatu region. Roads often became treacherous and impassable in bad weather, and as the Manawatu River was not navigable far inland, a more dependable route than the roads was necessary so that the region could receive imports and export its products, particularly timber. Due to poor financial conditions at the time, a tramway built with wooden rails rather than a railway was proposed in 1865 as a cost-effective mode of transport. Not even this was affordable at the time, and it was not until Julius Vogel announced his "Great Public Works" policy in 1870 that construction was finally approved.
As planned in 1865, the line was built as a wooden-railed tramway, with construction commencing in 1871. On 20 August 1872, a steam locomotive constructed by the Dunedin firm of Messrs R. S. Sparrow and Co. was delivered and operated on the completed portion of tramway; this was the first New Zealand-built locomotive to run. The line was completed to Palmerston North on 25 July 1873, a distance of 40 kilometres, and soon proposals were made to extend it to Wanganui. However, by 1874, the inadequacies of wooden rails were becoming apparent, and after an attempt at relaying the line with iron rails in February 1875 did not provide the durability required, the decision was made to relay the line with steel rails to railway standards. The land through which the line ran was generally flat, with the Oroua River the only serious obstacle. It was crossed with a 56-metre long bridge. The line was formally re-opened as a railway on 27 April 1876.
In 1886 the Wellington and Manawatu Railway's (WMR) line was opened from Wellington to the Foxton line at Longburn, near Palmerston North. The government's original plan had been to extend the Foxton line down to Wellington, but the private company established to build the line due to the government's inaction elected to follow the most direct route to Palmerston North, thereby bypassing Foxton. At this point, the Foxton line technically became a branch line, though it remained the terminus of the government railway's main line until 1908, when the WMR was purchased and incorporated in the North Island Main Trunk Railway linking Wellington and Auckland. The Foxton Branch was a branch in all aspects from this time onwards.
The following stations were on the Foxton Branch, with the distance from the junction in Longburn in brackets:
The line was very important for its first 12 years. Northbound freight and passengers from Wellington came up the west coast via ship and transferred to the railway in Foxton, and the town was served by express trains. When the WMR's line opened, traffic to Foxton dropped so markedly that services were slashed to run on alternate days, though daily trains were restored at a later date. Passenger ferries between Wellington and Foxton disappeared overnight. Most freight also used the new line, but the government railways did not wish to utilise a competitor's service and continued to ship railway coal in via Foxton. The flax trade in the region also continued to use Foxton as a harbour and provided traffic for the line.
In 1903, a mixed train ran daily between Foxton and Palmerston North, and it was augmented by a passenger-only service from Palmerston North and return thrice a week. In 1913, the passenger train operated six days a week. However, freight services were in decline: with the acquisition of the WMR in 1908, the Railways Department ceased shipping coal via Foxton. The wharf's condition was deteriorating and by 1916, only one shipping company possessing two steamers used Foxton, and when the company's main shed burnt down in 1922, it ceased to operate. Local interests continued to try to generate shipping traffic but met with little success and only a small amount of traffic was generated for the railway. In 1942, all shipping via Foxton ceased.
In 1932, passenger services were withdrawn and the locomotive depot closed, with the only trains on the line being a daily goods service from Palmerston North. During World War II, troop trains ran as the Manawatu Mounted Rifles established a camp on Foxton's racecourse, but after the war traffic continued to decline. Only three trains ran a week in 1952; in comparison, road freight services to the town were thriving. A mere 5,500 tonnes per annum were railed off the branch to other destinations, while 13,000 tonnes of freight came onto the line. The traffic outwards was mostly woolpacks and root crops, while lumber, lime, manure and coal were the primary traffic inwards. Closure was inevitable, and some may see it surprising that the line survived until the end of the 1950s. A farewell passenger excursion ran on 17 July 1959, and the last freight train operated a few days later. Formal closure was on 27 July.
It is typical for evidence of closed railway lines to be destroyed by both nature and human activity, but some remnants of the Foxton Branch still exist. The line ran for much of its length right beside State Highways 1 and 56, but road re-alignment and flood control earthworks have destroyed some of the formation. Near Longburn, SH 56 utilises the formation. Rubble from both the railway and old road bridges across the Oroua River can still be seen from the new road bridge. Little of the railway remains in Foxton.