Cook held the Sox to two runs on seven hits in 7 1/3 innings, escaped two-on jams three times and received polite hand claps from Fenway fans behind the Rockies' dugout.
"It was very comfortable -- it was actually one of the funniest places I've pitched," said Cook, who forced 12 ground-ball outs, which included two double plays.
"It's always hard when somebody goes out and gives that kind of effort and he gets a loss," said Rockies manager Clint Hurdle, whose club missed a chance to rise to .500, but is 3-2 on its current road trip and has won 14 of its last 22 games.
But Wakefield (6-7) limited the Rockies to one run on four hits in eight innings. Only twice did he face a runner in scoring position.
The Rockies' run came in the top of the eighth after Brad Hawpe led off with a double.
"He throws strikes and has it moving in any direction, so I closed my eyes and hit one on the barrel," said Hawpe, who scored on Yorvit Torrealba's RBI single.
Just one player in the Rockies' lineup, Todd Helton, had previously faced Wakefield, and the unfamiliarity showed.
"I didn't know the guys, [but] I know they have a pretty good lineup over there," Wakefield said. "I was just trying to get our offense back in the dugout as soon as possible."
With the game tied at 1 and David Ortiz standing at the plate in the eighth inning, Hurdle replaced Cook with left-hander Jeremy Affeldt.
Even though Cook was rolling and felt strong after 119 pitches, the move had plenty of justification. Ortiz had two singles and a walk against Cook, and Affeldt had dominated Ortiz to the tune of 0-for-12 with four strikeouts and no walks.
"We felt like it was the proper time," Hurdle said.
However, Affeldt left a 1-1 pitch over the plate that Ortiz drove to right-center for a double.
"I put it on a tee for him; it was the pitch he was looking for, and the pitch I didn't want to throw," said Affeldt, who wanted to entice Ortiz to swing at a pitch outside the strike zone.
After an intentional walk, J.D. Drew lifted a sacrifice fly for the go-ahead run. Jonathan Papelbon, who picked up his 15th save, protected the lead with a perfect ninth, which he finished with a strikeout of Helton.