The Mets (65-56) -- whose magic number is down to 37 -- opened a season-high five-game lead over the Washington Nationals (60-61) for first place in the National League East.
Cespedes' third long ball of the night -- a two-run homer in the sixth against Christian Friedrich -- regained the lead after the Rockies had rallied from a six-run deficit to even the score at 8.
Cespedes -- who finished 5-for-6 with five runs scored and a stolen base -- became the franchise-record third Met with a three-homer game this season, joining Kirk Nieuwenhuis and Lucas Duda. The Mets became the first team in four years with three players to have three-homer games in a season. Corey Hart, Casey McGehee and Prince Fielder accomplished the feat with the 2011 Milwaukee Brewers.
Cespedes' seven RBIs are the third-most in a game in franchise history. Carlos Delgado had a franchise-record nine RBIs in a doubleheader game against the New York Yankees on June 27, 2008. Dave Kingman produced eight RBIs against the Los Angeles Dodgers on June 4, 1976.
Cespedes' 15 total bases are the second-most in franchise history in a single game. Edgardo Alfonzo had 16 in a 6-for-6 game on Aug. 30, 1999. Cespedes' shot to the right-center gap in the ninth was tracked down by Carlos Gonzalez, preventing him from going 6-for-6.
Cespedes' grand slam highlighted a six-run second inning as the Mets built a 7-1 lead.
However, a wounded Bartolo Colon failed to maintain that six-run cushion in the high altitude. Colon surrendered three homers and was knocked out after 3 2/3 innings once Nolan Arenado's three-run homer pulled Colorado within 8-7.
Colorado evened the score the following inning against Sean Gilmartin, although right fielder Curtis Granderson's throw to the plate on a would-be sacrifice fly nailed Nick Hundley and prevented Colorado from taking the lead.
Colon, attempting to bunt, had been struck by a pitch from Rockies starter Jon Gray on the right wrist in the second inning. Trainer Ray Ramirez checked on Colon after that at-bat as well as after Colon surrendered a homer to Ben Paulsen to open the bottom half of that inning. Colon remained in the game, despite noticeable swelling on the wrist.
By responding after the Rockies rallied, the Mets avoided blowing a six-run lead for the second time in a three-week span. The Amazin's blew a 7-1 lead in a loss to the San Diego Padres in the rain on July 30 at Citi Field, capped by Justin Upton's three-run homer against Jeurys Familia.
What now? Lucas Duda left the game in the seventh inning. There was no immediate word on the reason.