The Duke of Sussex will share "mistakes and lessons learned" during his life in a memoir to be published next year.
Announcing the deal with publishers Penguin Random House, Prince Harry said he would reflect "the highs and lows" and be "accurate and wholly truthful".
Harry, who alongside his wife Meghan stepped back from royal duties last year, will donate proceeds to charity.
The BBC has been told the duke has recently spoken privately with his family about writing the book.
A spokesperson for the duke added that he would not be expected to obtain permission for the project from Buckingham Palace.
They did not provide additional details on what share of the proceeds would be donated to charity, reports the BBC.
And Penguin did not disclose the terms of its deal, which includes an audio book and international rights.
The duke, 36, said in a statement: "I'm writing this not as the prince I was born but as the man I have become."
He added: "I've worn many hats over the years, both literally and figuratively, and my hope is that in telling my story - the highs and lows, the mistakes, the lessons learned - I can help show that no matter where we come from, we have more in common than we think.
"I'm deeply grateful for the opportunity to share what I've learned over the course of my life so far and excited for people to read a first hand account of my life that's accurate and wholly truthful."
Markus Dohle, of Penguin Random House, described the duke as being among "world-renowned leaders, icons, and change-makers we have been privileged to publish over the years".
A press release described the book as "intimate and heartfelt" and "honest and moving".
It added: "Prince Harry will offer an honest and captivating personal portrait, one that shows readers that behind everything they think they know lies an inspiring, courageous, and uplifting human story."
The Sussexes have established an organisation called Archewell, which has production arms alongside a non-profit foundation.
In May, it was announced that the Duchess of Sussex would publish a children's book, the Bench, about father-son relationships, as seen through the eyes of mothers with the same publisher.
It was said to be inspired by the bond between Harry and their son.
Harry and Meghan, 39, now live in the US with their two-year-old son Archie, and their daughter Lilibet, who was born in California on 4 June.
Earlier this month, the duke joined his older brother, the Duke of Cambridge, at Kensington Palace to unveil a statue of Diana, Princess of Wales on what would have been their mother's 60th birthday.
Harry has previously spoken of what he has described as his family's unwillingness to talk about his mother's death and of his use of drink and drugs to cope with the pain of losing her.
He has also said he wanted to "break the cycle" of the "pain and suffering" of his upbringing with his own children.