The games took place at Life Time Athletic at Sky, where Anthony spends the bulk of his offseason training.
James played for approximately two hours, a source said. Then he flew back to Ohio to attend his annual LeBron James Family Foundation function at Cedar Point amusement park.
"He just has a love for basketball," a source close to James said, adding that the Cavs star plans to partake in some pickup games in Los Angeles in the near future.
Another source said Durant traveled from the Washington, D.C., area to take part in Tuesday's games.
LeBron, Melo, KD take part in star-studded pickup game
A mini-All-Star Game breaks out as LeBron James, Carmelo Anthony, Kevin Durant and J.R. Smith, among others, take part in a pickup game.