White House spokesman Robert Gibbs said Obama would be in Germany on June 5, following a trip to Egypt.
Obama reportedly shied away from visiting to Berlin during his trip to Europe, because he did not wish to appear as if he was meddling in the upcoming German election. His trip therefore will likely be billed as a personal one rather than a state visit that could be seen as helping boost incumbent Chancellor Angela Merkel.
During a visit to Berlin last summer, Merkel allegedly kiboshed Obama's wish to speak in front of the Brandenburg Gate so as to avoid letting the potent symbol of German reunification become a backdrop for the US presidential campaign. He eventually drew a crowd of 200,000 people to a location nearby.
After a visit to the baroque Saxon capital of Dresden, Obama will also remember the millions of Jews and others killed in the Nazi concentration camps when he visits the former death camp at Buchenwald.
Obama's great-uncle, Charlie Payne, took part in the liberation of part of the Buchenwald camp in 1945 with the US Army, but Gibbs said it was unclear whether he would travel with the president.
Payne was a private in the 89th Infantry Division during World War II when he took part in the liberation of Ohrdruf, a forced-labor camp that was part of Buchenwald.
During a Holocaust remembrance ceremony at the US Capitol last month, Obama paid tribute to Payne, saying his great-uncle "returned from his service in World War II in a state of shock, saying little, alone with painful memories that would not leave his head.
"He went up into the attic, according to the stories that I've heard, and wouldn't come down for six months," Obama said. "He was one of the liberators - someone who at a very tender age had seen the unimaginable."
Following his time in Germany, Obama will then join commemorations to mark the 65th anniversary of the D-Day landings in Normandy in France.
French President Nicolas Sarkozy has vowed to give Obama an "extraordinary welcome" for the 65th anniversary of D-Day, when Allied troops stormed the Normandy beaches held by France's Nazi German occupiers.
More than 45,000 Allied soldiers, including 29,000 Americans, were killed during Operation Overlord, which saw them opening a second front on mainland Europe and led to the liberation of France.