Obama was interviewed about a number of basketball subjects by broadcaster Marv Albert on the White House basketball court. The interview will be shown Tuesday night at 8 p.m. ET.
James can become a free agent this summer, and his decision whether to leave the Cavaliers is one of the hottest topics in sports. Though he's never said he wants out of his native Ohio, there's speculation he'd consider it after the Cavaliers were knocked out of the playoffs in the second round by the Boston Celtics.
"I think that the most important thing for LeBron right now is actually to find a structure where he's got a coach that he respects and is working hard with teammates who care about him and if that's in Cleveland, then he should stay in Cleveland," Obama said. "If he doesn't feel like he can get it there, then someplace else."
Obama compared James' situation to the Bulls not winning until Michael Jordan had confidence in Phil Jackson, Scottie Pippen and the rest of his teammates. Once that happened, Chicago won six NBA championships in the 1990s.
"It wasn't until you got that framework around you that you could be a champion," Obama said. "Same thing happened with Kobe [Bryant]. You know, I think that, first with Shaq [O'Neal] then later with [Pau] Gasol, you know, he's gotten that sense of a team around him and I think LeBron hasn't quite been able to get that yet. That's what he needs to find."