Emergency services were alerted to the blaze at Hallyards Farm, in Kirkliston on the outskirts of Edinburgh, where around 200 tonnes of waste material were alight.
They were called to the scene at around 12.30am and remained there this morning, bringing the flames under control.
Crews from Sighthill, Crewe Toll, Tollcross and Livingston were involved at various stages of the operation, which required six fire engines at its height.
A service spokeswoman said the fire created "a large smoke plume" above the area. There were no casualties and no properties had to be evacuated.