James was 8-of-19 shooting for 18 points in more than 26 minutes and Bosh led the Heat with 20.
"I was just anxious to get back on the court," said James, who signed with the Heat as a free agent in the off-season, as did Bosh. "It's something I waited for all summer."
James gave his new hometown fans a thrill late in the closing seconds of the first quarter with a spinning dunk through the lane.
The other third of Miami's Big Three starters, Dwyane Wade, left with a strained right hamstring early in the game and did not return.
Udonis Haslem had 14 points and 13 rebounds for the Heat, who led by 20 points at halftime.
Ben Gordon had 17 points and Tayshaun Prince scored 15 for the Pistons. Jonas Jerebko left the game in the second quarter with an Achilles injury.
Dennis Rodman pledges to end trips to North Korea
Interpol investigating stolen passports on missing flight