The win also sets up Sunday's showdown with the current Lakers at the Toyota Center. They're both 45-20, the best records in the West.
As the final seconds ticked off, Dikembe Mutombo waved his arms, urging the capacity crowd to stand and cheer. McGrady simply stood at the free throw line near the Rockets bench, a tired grin on his face.
When the buzzer sounded, red streamers rained down as the crowd started chanting "M-V-P!" for McGrady.
Jason Richardson scored 28 points and Emeka Okafor added 23 for the Bobcats, who've lost five in a row to Houston.
Rafer Alston added 17 and Shane Battier had 12 points and nine rebounds for Houston, now 9-0 since Yao Ming's season-ending foot injury.
The Rockets also extended their home-court winning streak to 14 games, the longest since the 1985-86 team won 20 in a row at the Summit.
Houston has won 25 of its last 26 games and 30 of its last 33, easily the best stretch of any team since late December.
Now comes the real test -- after the Lakers on Sunday, Houston faces Boston, New Orleans, Golden State and Phoenix next week. The Rockets had won 13 of their previous 20 games by double digits, but the Bobcats made them work for this one.
Houston hit seven of its first 12 shots, then missed its next 14 tries to fuel a 21-1 Charlotte run. Richardson scored 11 points during the spurt, including two breakaway dunks and a 3-pointer. Jared Dudley's putback two minutes into the second quarter gave Charlotte a 29-18 lead, the largest deficit the Rockets had faced during their victory streak.
McGrady slammed home an alley-oop pass from Bobby Jackson with 8:28 left in the half, Houston's first field goal in 10 minutes. The Rockets were impatient on offense the rest of the half, heaving up questionable long shots early in possessions. They missed 14 of their first 17 shots from 3-point range.
Alston hit a 3 with 1:46 left, then hit a driving one-hander to pull Houston to 41-36. Okafor answered with a bank shot to put Charlotte up by seven at halftime.
The Rockets looked like a more energetic team out of the break, suddenly clicking on offense and making plays at the other end.
Houston opened the third quarter with a 26-11 run, started when Battier rebounded his own miss and put back a layup. Battier then deflected a pass and saved the ball to Alston, who started a fast break that Luis Scola finished with a layup to cut Charlotte's lead to 43-40.
Later, Mutombo swatted away a shot by Matt Carroll and Battier finished a fast break with another layup to put Houston up 54-50. McGrady sank a shot from the wing with 3:30 left in the quarter to complete the spurt and put the Rockets up 62-54.
The Bobcats missed 11 of their first 17 shots after halftime, but Gerald Wallace's 3-pointer in the final seconds cut Houston's lead to 64-62.
The Rockets scored the first eight points of the final quarter to keep control. After McGrady hit a fadeaway from the baseline, he flexed his muscles and yelled, "Let's go!" as he trotted down the court. Reserve forward Mike Harris then scored inside to stretch Houston's lead to 72-62.
The Bobcats twice closed within six, but the Rockets made the stops and free throws when it counted.
Mutombo embraced McGrady at midcourt in the final minute as Rockets owner Les Alexander stood and cheered with the rest of the crowd.
Notes: McGrady also had seven rebounds and four assists. ... Harris scored 12 for Houston. ... Wallace scored 16 in his second game back since recovering from a concussion. ... Rockets rookie forward Carl Landry missed his fourth straight game with a bruised right knee.