Publisher Farrar, Straus and Giroux said that Mr Obama will contribute to Mr Mandela’s “Conversations With Myself.”
The book is a collection of diaries, journals and other personal material written by the former South African president during and after his anti-apartheid struggle. Several parts of the book were written during his imprisonment in Robben Island.
It is due to be published on Oct. 12.
Mr Mandela’s 1994 autobiography “Long Walk to Freedom” has sold six millions copies worldwide. Mr Obama’s own books, “Dreams From My Father” and “The Audacity of Hope,” were best sellers, earning the president millions of dollars.
“We always had a hope that Obama might do it, and a plan that we would put a call in,” Jonny Geller, literary agent for the book at Curtis Brown, told the Guardian. “Now it’s been delivered and we realised it’s better even than what I’d sold – the quality exceeds the hype. It’s brilliant.”
The US president’s foreword was a perfect fit with the book, Mr Geller said. Both men are Nobel Prize winners.
“It feels right,” he said. “The most significant event of the last few years has been Obama becoming president, and he’ll be commenting on the most significant black leader in history.”
The former ANC leader, who will be 92 next month, is so frail that he has not made a public appearance since February.