Luis Scola scored six of his 17 points in the extra period and Shane Battier grabbed a season-high 13 rebounds for the Rockets, who've won their last 10 games when holding their opponent below 100 points. Chuck Hayes added 15 points for Houston.
Zach Randolph scored 22 points and grabbed 17 rebounds for the Grizzlies, who had a five-game winning streak snapped. Memphis has not win six in a row since March 2006.
The Rockets rallied from 14 points down in the second quarter, and the game was tied 87-all at the end of regulation.
Scola scored twice in the first three minutes of the extra period to put the Rockets up 93-91. Randolph flipped in a turnaround shot with 55 seconds left to tie it again, but Scola gave Houston the lead with a scooping layup 22 seconds later.
Mike Conley missed a 3-pointer in the final seconds. Houston point guard Kyle Lowry saved the ball from going out of bounds and heaved it toward the other end of the court as the buzzer sounded.
The Rockets shot only 39.5 percent (34 of 86), but went 22 for 25 from the free-throw line.
Rudy Gay had 17 points and 11 rebounds and Marc Gasol scored 19 for the Grizzlies, who were outrebounded 51-46 and mustered only 16 points in the fourth quarter.
Memphis led most of the way.
Greivis Vasquez banked in a straight-on shot from just inside midcourt at the first-quarter buzzer to give the Grizzlies a 26-20 lead.
Brad Miller started the second quarter for Houston, returning to action after missing 14 games with soreness in his left knee.
Memphis stretched the lead to 14 in the second quarter, as the Rockets continued to misfire. They went 8 for 23 in the first quarter, then missed 5 of their first 8 shots in the second.
Randolph scored 10 points and grabbed five rebounds in the quarter and the Grizzlies led 51-43 at the break. Martin had 12 points at halftime, but was 8 for 8 from the free-throw line and only 2 for 7 from the field.
Martin opened the third quarter with a three-point play and his first 3-pointer to quickly cut the deficit to two. Martin sank two free throws with 5:01 left in the quarter, and Hayes drove past Randolph for a hook shot to put Houston ahead 63-61.
Memphis finished the quarter with a 10-2 run, capped by Darrell Arthur's dunk with 30 seconds left, to take a 71-67 lead to the fourth. Houston started the last quarter with a quick 6-0 run to take a two-point lead.
Randolph spun for a short jumper, then rebounded a missed free throw and scored to put the Grizzlies back ahead with seven minutes left.
Martin cut the Grizzlies' lead to one with two more free throws, then spun on the baseline for a basket with 2:31 remaining to give the Rockets an 86-85 lead.
Gay swished a jumper from the top of the key and Lowry split two free throws to tie it heading into the final minute.
Gasol missed from close range with about 25 seconds left, and the Rockets corraled the loose ball. Scola missed a long jumper just before the buzzer and the game went to overtime.
NOTES: Martin reached 30 points for the 11th time this season. ... The Grizzlies dropped to 20-6 when leading after three quarters. ... Memphis has held its opponent under 100 points in 32 games this season. ... Randolph has 37 double-doubles this season. ... Rockets C/F Jordan Hill sat out for the second straight game with a sprained left ankle.