The former US President will also answer questions from the audience at the charity fundraising event.
The dinner, on May 26, is being organised by The Hunter Foundation, set up by leading businessman and philanthropist Sir Tom Hunter, with tickets for a table of 10 expected to go on sale for about £5,000.
All the cash raised will be split between children’s charities in Scotland and the Obama Foundation, set up by the former president and his wife Michelle. Sir Tom also plans to set aside some seats at the event for local young people.
Former US president Barack Obama is set to visit Scotland
To be able to get President Obama, we’re really chuffed
Sir Tom Hunter
He said: “From the South Side of Chicago to the White House has been an epic, historic journey and it will be a true honour to hear that story from the man who made that journey.
“We are truly proud and delighted to be hosting the 44th president of the United States.”
The Hunter Foundation has previously arranged visits to Scotland by US politicians, including Bill Clinton, as well as by actors, such as Leonardo DiCaprio and George Clooney.
He will address a gathering of business leaders in Edinburgh President Obama in Africa Mon, July 27, 2015
U.S. President Barack Obama during his official visit to Africa, July 2015.
AFP/Getty Images 1 of 13
Ethiopian President Mulatu Teshome and US President Barack Obama shake hands during a meeting at the National Palace in Addis Ababa on July 27, 2015
Get Quotes on Home Insurance
“We’re always looking for really inspiring speakers to come to Scotland,” Sir Tom said. “To be able to get President Obama, we’re really chuffed.”
The entrepreneur-turned-philanthropist also revealed he is planning a special surprise for the 44th US president.
He said: “President Obama loves his music, so we’re getting some interesting guests.”