WASHINGTON — The first time Barack Obama visited Kenya, the land of his father, he was hoping to fill “a great emptiness” he felt inside, to figure out who he was and where he fit in the world.
He was met at the airport by a half sister and an aunt. “Welcome home,” the aunt told him. The three squeezed into an old Volkswagen Beetle, whose muffler fell off during the drive into Nairobi. As the aunt got out to go to work, she admonished Mr. Obama not to “get lost again.”
Twenty-eight years later, he leaves on Thursday to return to Kenya as the president of the United States with an entourage of hundreds and a long motorcade that includes an armored car with a working muffler. Any question of where he fits in the world has long since been answered. But how Kenya fits into his own identity remains one of the enduring questions of his presidency.
Through more than six years in office for Mr. Obama, Kenya has been a complicated part of his political persona. Known for a youthful memoir exploring his Kenyan roots, Mr. Obama has been celebrated as a son of Africa who reached the pinnacle of power. But he also found himself besieged by a conspiracy theory that he had actually been born in Kenya and was therefore ineligible to be president — a theory he felt compelled to dispel by marching into the White House briefing room in 2011 with his a birth certificate from Hawaii.
Mr. Obama considered the “birther” movement, now largely defunct, a distraction and a cynical ploy by opponents like Donald J. Trump, but he stayed away from Kenya until now, unwilling to provoke the obvious political circus that would have ensued. During his first term, he spent about 24 hours in sub-Saharan Africa, and on the other side of the continent from his father’s home. Some critics said that the first president with African roots was doing less for the continent than the white president he succeeded.
With re-election behind him, Mr. Obama has shown renewed interest in Africa. He hosted a summit meeting in Washington for African leaders last year and just pushed a renewal of an African trade preference program through Congress.
This week’s visit to Kenya, followed by a stop in Ethiopia, will be his fourth trip to sub-Saharan Africa as president, more than any of his predecessors made. He will be the first sitting president to visit either Kenya or Ethiopia, and he hopes to reinforce efforts to bring electricity, security and democracy to Africa.
“President Obama’s record on Africa will not only match that of his predecessors but, I will predict with confidence, will exceed it,” Susan E. Rice, his national security adviser, said Wednesday, citing his Power Africa electrification program and his Feed the Future effort to make sure Africans have enough to eat.
The trip will have its trials dealing with two countries that have not been models of democracy lately. In Kenya, he will meet with President Uhuru Kenyatta, who had been charged with crimes against humanity for instigating ethnic violence until the case was dropped last December. In Ethiopia, he will meet with Prime Minister Hailemariam Desalegn just a month after the governing party and its allies won 100 percent of the seats in Parliament.
His initiatives have had their own troubles. Power Africa, which Mr. Obama kicked off during a 2013 visit to the continent, has so far not delivered the kind of electricity it promised. Ms. Rice said the program had been slow to get off the ground but was now “building up strength and capacity,” adding, “This is going to take time.”
But as much as the policy issues will present challenges for the traveling president, so will the emotional and symbolic ones.
“Obviously, Kenya holds a special place for him, and it was central to that first book and, I think, central to his self-exploration,” said David Axelrod, Mr. Obama’s former White House senior adviser. “And I think he also knows what he represents there.”
Bill Burton, another former aide, said Kenya had shaped Mr. Obama’s identity as an African-American. “It’s obvious if you read his books, if you listen to what he’s said about his own biography, Kenya plays a very big role in how he thinks about the world and how he thinks about his relationship with other Americans,” Mr. Burton said.
In his first book, “Dreams From My Father,” Mr. Obama described his upbringing in Hawaii as the son of a black university student from Kenya, Barack Obama Sr., and a white anthropologist originally from Kansas, Stanley Ann Dunham. He never really knew his father, whom he met only once, when he was 10, but he felt a connection that eventually took him to Kenya in 1987.
He spent several weeks sleeping on the living room sofa of his half sister, Auma, who taught at the University of Nairobi, and meeting the many relatives of the various wings of the family. He traveled to his father’s home village — “there was a goat in my lap,” he recalled — and met his grandfather’s last wife, known as Mama Sarah, whom he called Granny even though there was no blood tie. In the book, he wrote that for the first time, he enjoyed “the comfort, the firmness of identity.”
But it was not as simple as that, according to David Maraniss, author of “Barack Obama: The Story,” a biography of the president as a youth that ends with the trip to Kenya. Mr. Obama learned about the divisions in his own family, among the Luo and Kikuyu tribes and between Africans and Asians.
“His young life had been a struggle to integrate the disparate parts of his history in a way that would make him feel whole,” Mr. Maraniss wrote. “Instead, his trip offered only more contradictions that were hard to reconcile.”
Mr. Obama’s own account of his physical and emotional journey helped define him for many Americans. “I read his first book and was moved by it,” said Senator Jeff Flake, Republican of Arizona and chairman of an African subcommittee, who will be among the lawmakers joining the president on the trip. “I don’t think anybody could read it without being moved by it. It would be a great experience to go back.”
Mr. Obama returned as a young man and then in 2006 as a relatively new senator. That trip was a preview of what he will encounter this week, with a 12-car motorcade and swarms of people greeting him everywhere he went. He visited Mama Sarah’s village and stopped by his father’s grave, but was surrounded by media hoopla.
“It’s amazing to think of a president of the United States in this little tiny village with very basic structures,” said Bob Hercules, who accompanied him and made “Senator Obama Goes to Africa,” a documentary about the trip. “It’s just unbelievable.”
As president, there were plenty of diplomatic reasons not to go to Kenya at first, not least the indictment against the country’s president. But there were other reasons, too.
“If you’re asking me, ‘Was there a political discussion as to whether it would be disadvantageous to show up in Kenya when Donald Trump was questioning his citizenship,’ I don’t recall ever having that discussion,” Mr. Axelrod said. “But maybe no one needed to have that discussion.”
With that concern now behind him, Mr. Obama will depart Washington on Thursday night. But he acknowledged last week that it would not be the same as when he first visited as a young man with questions. Given security and logistical concerns, Mr. Obama will not be able to visit his father’s village. Instead, his relatives, including Mama Sarah, will be brought to him in Nairobi.
“It’s obviously something I’m looking forward to,” he said at a news conference. “I’ll be honest with you, visiting Kenya as a private citizen is probably more meaningful to me than visiting as president, because I can actually get outside of a hotel room or a conference center. And just the logistics of visiting a place are always tough as president. But it’s obviously symbolically important.”