ED Miliband will be bracing himself for a potential political storm on the eve of his keynote conference speech this autumn after the announcement that Damian McBride, Gordon Brown's former spin doctor, is to publish his memoirs hours before the Labour leader gets to his feet in Brighton.

Entitled Power Trip: A Decade of Plots, Policy and Spin, the publishers of the book, Biteback Publishing, run by former Conservative blogger Iain Dale, said it would "send shivers down the back of the Labour establishment as it reveals the truth about life within Mr Brown's Government".

Mr Miliband, like Shadow Chancellor Ed Balls, was an aide to Mr Brown at the Treasury and was promoted to the Cabinet when the Scot became Prime Minister in June 2007.

In 2009, Mr McBride quit his role at the then premier's side over his involvement in a plot to smear Tory MPs by spreading untrue rumours about them; Mr Brown at the time insisted he knew nothing of the smear campaign.

Following his time in Downing Street, Mr McBride, who now works for Cafod, the Catholic Agency for Overseas Development, has helped enhance his damaged reputation at Westminster through his blog posts about his government career.

His memoirs of his time behind the scenes, first at the Treasury and then in No 10 – the first by any inner circle Brownite – will cover the ex-spin doctor's 10 years working for Mr Brown.

The publishers said the book would reveal the "personal feuds, political plots and media manipulation, which lay at New Labour's core, and provides a fascinating, funny, and at times shocking account of how government works".

Mr McBride said: "Given that Iain Dale was one of my supposed enemies when I was working in Downing Street, he was the last person I expected to be working with but his thoughts on what this book should be about exactly matched my own."

Royalties will be split between Cafod and the appeal run by Mr McBride's former employers, Finchley Catholic High School, to build a new sixth-form centre.

Last night, Labour at first declined to comment but then a source told The Herald: "We have moved a long way from those days."