Crews from across the Capital, as well as East and Midlothian, were called to Borthwick Mains Farm, Gorebridge, following emergency calls received shortly after 7pm yesterday.
They said the fire had broken out in a farm shed barn containing 200 tonnes of bailed straw and described the blaze as “sizeable”.
Specialist breathing equipment was also requested due to the suspected presence of asbestos, they added.
There are no reports of casualties and crews said a short while ago that the fire had been brought under control.
A spokesman said: “We are damping down the fire and protecting the adjacent building.”