CHICAGO—LeBron James is taking his game to the silver screen.

The Miami Heat superstar confirmed reports before Thursday's game against the Chicago Bulls that he will co-star with Kevin Hart in the comedy "Ballers." Hart plays the brother of an NBA star who gets a chance to prove himself at a fantasy basketball camp in Miami.

James says the opportunity to work with Hart was a product of their "friendship" and "mutual respect." He says the role is "something I could relate to, as far as fantasy basketball and guys wanting to be basketball players" who "never had really had the great opportunity to be a professional athlete."