Jason Giambi hit a two-run home run while Troy Tulowitzki added a solo shot for the Rockies, who have won seven straight and moved four games back of San Diego for first place in the NL West and four games back of Atlanta for the wild card spot.
Cincinnati holds a 5 1/2 game lead over St. Louis for first place in the NL Central.
Colorado trailed by five runs after two innings, but clawed its way back and took the lead in the eighth.
With Masset on the mound to start the frame, Tulowitzki led off with a homer to right to tie the game. Giambi then walked and was replaced on the basepath by Nelson. Melvin Mora hit a chopper to first and Joey Votto threw the ball over the head of Masset covering at first as Nelson moved to third.
Ryan Spilborghs then struck out for the first out of the inning. With Miguel Olivo at the plate, Nelson stole home as Masset was paying no attention to him for a 6-5 lead. It was Nelson's first career stolen base.
Huston Street came on in the ninth and gave up a leadoff single to Hernandez, but then set down the next three batters to pick up his 17th save of the season.
The Reds struck in the first inning to take the lead. With one out, Brandon Phillips singled, stole second, advanced to third on a wild pitch then came home on a check-swing dribbler back to the mound by Votto.
Cincinnati tacked on four more runs in the second. Jonny Gomes led off with a single and came home when Hernandez followed with a double. After Chris Heisey struck out, Paul Janish blooped a single to center to plate Hernandez. Stubbs later homered just over the wall in left for a 5-0 lead.
Colorado got on the board in the fourth. With one out, Tulowitzki walked and Giambi followed with a shot over the center field wall to make it a 5-2 game.
The Rockies cut into their deficit further in the fifth. With two outs, Eric Young Jr. kept the inning alive with a walk and hustled home when Dexter Fowler followed with a double to make it a 5-3 game.
Colorado made it a one-run game in the seventh, but blew an opportunity to tie the game or even take the lead. Spilborghs walked to leadoff the frame and moved to third when Chris Iannetta followed with a double. Aroldis Chapman then took the mound and Jonathan Herrera made it to first on a fielder's choice that saw Spilborghs beat the tag at the plate.
After Young struck out, Fowler walked to load the bases, but Carlos Gonzalez hit into a double play to end the inning.
Votto's RBI in the first inning was his 100th of the season. It is the first time in his four-year career that he has eclipsed the 100-RBI mark...The Reds host Pittsburgh for three games starting on Friday...The Rockies welcome Arizona to Colorado for three games starting on Friday...Colorado has won 19 of the last 22 games against Cincinnati, including 10 straight at home.