Ayot St Peter had a railway station on the Welwyn Garden City to Luton line. The station was called just plain “Ayot” and was located on the Ayot St Peter Road.
A fire broke out at the station in July 1948, and most of the buildings were destroyed. The station closed for passengers on 26 September 1949, although passenger trains used the line until 1965.
The old station car park is now the car park for the Ayot Greenway, a popular walking route that follows the disused railway line from Ayot to Wheathampstead.