David Cameron will give a "frank" account of his time in Downing Street after signing a deal for his autobiography.
The former prime minister will spend the next year writing the book, which will give an insight into family life at No 10 as well as the inside track on his government.
Mr Cameron said he will explain the decisions he made and will admit "what worked and what didn't".
The tome, which does not yet have a title, will cover in depth the decision to call a referendum on Britain's membership of the European Union and the crushing defeat that led him to quit as prime minister and later as an MP.
It will also cover the Scottish independence vote and range across reforms to the economy, welfare and education.
Mr Cameron's controversial handling of foreign affairs, including the bombing of Libya, and the crucial vote he lost on Syria, will also be examined.
William Collins, an imprint of HarperCollins Publishers, secured the autobiography and expects to publish it in 2018.
Mr Cameron said: "It was an immense privilege to lead the Conservative Party for more than a decade and the country for over six years as prime minister.
"I am looking forward to having the opportunity to explain the decisions I took and why I took them. I will be frank about what worked and what didn't."