Updated

Mike Miller came into Saturday with exactly zero points at home this season.

He now has 32.

Getting his long-awaited Miami breakout game, Miller scored 22 points in the second quarter alone, helping the Heat beat the Toronto Raptors 120-103 to snap a four-game slide.

LeBron James finished with 38 points and 11 rebounds for Miami, which played without Dwyane Wade (migraine) and Chris Bosh (left ankle sprain). James Jones scored 15 and Eddie House added 13.

The Heat led 32-17 after one quarter and 66-40 at the half, then held on after Toronto — which had big-time roster issues of its own — cut the lead to 10 with 10:13 remaining.

DeMar DeRozan scored 30 and Andrea Bargnani added 28 for the Raptors, who wrapped an 0-5 road trip and dropped their seventh straight overall. Toronto had only nine players available for the game, but had more than enough to put a serious scare into the Heat.

Jose Calderon had 14 points and 13 assists for Toronto, which also got 14 points from Amir Johnson.

DeRozan and Bargnani combined for 25 of Toronto's 37 points in the third quarter, giving the Raptors plenty of life, and when Bargnani hit a 3-pointer with 6:27 remaining, the Miami lead was down to a tenuous 99-92.

Mario Chalmers hit his third 3-pointer of the game for Miami 21 seconds later, restoring the 10-point margin, and the Heat found a way to end their longest losing streak of the season. James drove from the left wing for a three-point play with 5:12 left, pushing the lead to 106-94.

A minute later, James provided the exclamation point.

The league's two-time reigning MVP grabbed a defensive rebound, dribbled up the left sideline, cut to the middle of the lane and when no Toronto defender got in his way, James went in for a dunk that pushed Miami's edge back to 14.

The win, combined with Boston's loss in Washington, got Miami within 2½ games of the Celtics for the best record in the Eastern Conference.

Toronto was without forwards Linas Kleiza and Joey Dorsey, who were both dealing with sore knees.

"It's frustrating because everyone here is competitive and everyone here wants to give us the best opportunity to win," Raptors coach Jay Triano said. "With that, some of our younger kids are getting a chance to play a lot of minutes and getting a chance to develop their game."

Miller got his first chance to start for Miami, thanks to the cobbled-at-the-last-minute lineup Heat coach Erik Spoelstra had to put together because of Wade's absence. Wade was in the building for Miami's shootaround practice Saturday morning, then went home to continue battling his migraine — a problem he dealt with somewhat regularly in the past.

He wasn't in the arena for the game, and in the early going, he wasn't exactly missed. Jones was 4 for 4 in a 13-point first quarter, and the Heat were off and running.

The second quarter was all about Miller.

He came into the game 0 for 7 in Miami this season, all on 3-point tries, and rattled in a jumper from the right side of the foul line midway through the opening quarter. In the second, he put on the sort of show Miami envisioned when it gave him a $25 million, five-year deal during last summer's free-agent bonanza.

Miller made 8 of 12 shots, 5 of 8 from 3-point range, on his way to the biggest second quarter by any player in the franchise's 23-year history. Walking onto the court after a timeout midway through that period, James gave him a pat on the head, followed by another slap on the back.

"Welcome," James said.

The 32 points matched the 13th-biggest scoring night of Miller's career. He also had 10 rebounds, completing his 44th double-double.

NOTES: It was the 10th time in franchise history Miami had two 30-point scorers in the same game. ... Toronto lost by 40 in Orlando on Friday night. No NBA team has lost back-to-back games by 40 points since the Philadelphia 76ers in April 1994, according to STATS LLC. ... Wade remained stuck on 12,997 points.