A blaze involving plastics is said to have caused a fire at Bow Brickhill level crossing.
Milton Keynes Fire and Rescue Service confirmed that a fire involving "mixed plastics" had caused the blaze next to the railway line.
The fire caused a large black plume of smoke in the surrounding area, and burning plastic can give off dangerous fumes.
A fire service spokesman said: "We advise people living nearby to keep their doors and windows closed."
Bucks Fire has so far received almost 50 calls alerting them to the fire.
It is not known as yet whether the plastic materials had been dumped or if the blaze was a planned bonfire.
Network Rail officials have been called to the scene to decide whether trains on the Bedford to Bletchley line should be halted and the level crossing closed.