The Mavisbank Trust has campaigned since 2002 to save the building. This latest bid was submitted by Historic Environment Scotland and the Landmark Trust to create self catering accommodation, enabling thousands of people to stay for holidays or visit the site near Loanhead.
One of the pavilions would have been developed as a skill centre and the other as a community wing.
A community greenspace would have also been created in the 70 acre grounds.
Rhona Brankin, chair of the Mavisbank Trust said “We are absolutely devastated by this news.
"We put in a Lottery bid in 2013 which was turned down and we were asked to put in another bid. To fail to secure funding again for this wonderful building and it’s designed landscape is frankly shocking.
"This latest project bid by Historic Environment Scotland and the Landmark Trust would have saved Scotland’s most important small country house house and it’s wonderful grounds for the future and would have secured much needed investment and jobs for Midlothian ”
Midlothian MP Owen Thompson (SNP) said: "I am deeply disappointed and surprised. It's one of Scotland's most important small country houses but it urgently needs investment to ensure its survival. This pioneering project had the vision to make it happen, bringing strong economic, environmental and cultural benefits to Midlothian, so this is a missed opportunity for the area.”
Looking forward, Mr Thompson added: "This was an impressive bid from an experienced team and my thanks for all the extensive work put into it from Historic Environment Scotland and The Landmark Trust.
"While this news comes as a real blow we know there is an excellent project mapped out and the battle to save Mavisbank must continue. I will keep supporting the efforts of the Mavisbank Trust and everyone who wishes to see this hidden gem of Midlothian brought back to life for all to enjoy. "