It is the first win for Memphis over a Southwest Division opponent after it started the season 0-10 in the division.
The victory ruined a spectacular night for Houston's Chandler Parsons. He had a career-high 34 points and made 10 3-pointers -- all in the second half. It is an NBA record for 3s in a half and a franchise record for 3s in a game.
A 6-1 run by Memphis gave the Grizzlies an 88-84 lead with about two minutes left. Parsons made his 10th 3 to make it 88-87 right after that.
He had his only miss of the second half a few seconds later, and Houston couldn't get him the ball on the last possession.
James Harden set a career high with 13 assists, but had a tough night shooting. He was just 2 of 11 and finished with 10 points.
The Grizzlies led by four points when Houston scored five quick points capped by Parsons' ninth 3-pointer to take an 83-82 lead with a little than more than four minutes remaining. He was knocked to the ground by Tayshaun Prince as it left his hand and no foul was called. He looked angrily at the nearest official as the crowd erupted when it swished the net.
Memphis outscored Houston 12-7 over the first four minutes of the fourth quarter to take a 76-71 lead. Parsons hit his eighth 3-pointer of the game after that before a free throw by Jeremy Lin got Houston within one point.
The Rockets scored the first 12 points of the second half to erase a nine-point deficit and take a 46-44 lead with about nine minutes left in the third quarter. Houston -- which had made just one 3-pointer in the first half -- had two during that run. They were both by Parsons, who was 0 for 3 on 3s in the first half.
The Grizzlies had two turnovers and missed three shots during that run by Houston.
Memphis finally ended its offensive drought with a 3-pointer by Prince after that, but Houston responded with a pair of 3s to push the lead to 52-47.
Zach Randolph scored seven straight points after that to put the Grizzlies back on top 53-52. About a minute later, Lee scored the first five points of a 7-0 spurt to extend the lead to 60-55.
Houston tied the game at 64-all entering the fourth quarter thanks to 3-pointers on three consecutive possessions by Parsons to end the third and leave him with six in the quarter.
Memphis had a one-point lead in the second quarter when it used an 11-2 spurt to extend the advantage to 34-24 about 4 1/2 minutes left before halftime. Ed Davis scored six points during that run and Mike Conley added a 3-pointer.
The Rockets missed five 3-pointers in that span as part of an 0-for-12 start to 3-point shooting on Friday night. Omri Casspi made Houston's first one with less than a minute remaining in the first half. They were 1 for 14 on 3s in the first half and trailed 44-35 at the break.
The Grizzlies were up by seven points in the first quarter before Houston used a 12-6 run to cut the lead to 21-20. Dwight Howard started it with an alley-oop dunk and Lin capped it with a layup.
NOTES: Grizzlies G Tony Allen missed his ninth straight game with a sprained left wrist. ... Houston's Terrence Jones returned after missing two games dealing with the flu and a deep thigh bruise and had nine points.