Vladimir Guerrero's RBI single with two outs in the eighth tied the game for the Rangers before Nelson Cruz delivered the walk-off homer on the first pitch he saw from Tim Wakefield to win it in the 11th.
"It's a guy that has swung the bat very well against him," manager Terry Francona said. "The one situation where there was really nothing else to do. We had lined it up where we go to [Jonathan Papelbon] for an inning, because Wake's the one that's stretched out.
"We go to Wake first and we get a lead and we bring in Pap, then we've got nobody behind him. Wake was going to pitch until we won or lost. The good news is he won't be tired."
The last time Boston suffered consecutive walk-off losses was July 1-2, 2004.
"I was just battling and looking for a good pitch high," Cruz said. "I was looking for the first pitch, because he has a history of throwing the first pitch for a strike."
It was a heartbreaking defeat for the Red Sox, who belted three consecutive homers in the fourth inning before their bats fell silent over the final four frames.
Rangers relievers held the Red Sox scoreless over that span and retired their last 11 hitters.
"It's tough," outfielder J.D. Drew said. "We had a big lead and unfortunately we couldn't hang on to it. Those guys on their side swung the bat well in big situations and got the job done."
It looked like it would be an easy victory for Boston after its huge fourth inning in which the Sox tallied three straight homers and seven runs overall.
It started with David Ortiz, Adrian Beltre and Drew, who each blasted solo shots against Rangers starter Tommy Hunter before the Red Sox tacked on four more runs later in the frame.
It was the most homers Boston had hit consecutively since belting four straight long balls against the Yankees in 2007.
Ortiz's came on the first pitch of the inning, with Beltre's coming two pitches later. Drew capped the home run barrage with a blast to right field four pitchers after that.
Three more runs followed on a two-run single by Marco Scutaro and another run-scoring single off the bat of Victor Martinez.
Despite the large margin, Francona was far from convinced the game was in hand.
"I'd rather be up that much, but we don't ever feel like [we're comfortable], especially in this ballpark," Francona said. "This was a game we could certainly win but we didn't. It's harder when you go through your pitching. If you win, it's great because we went through our pitching but we won. If you lose, that makes it difficult."
Jed Lowrie had started the rally the inning before with a leadoff homer to right-center field, making Friday's game the 10th time this season that the Red Sox had hit four or more homers and the second in three games. They also notched four in a 10-1 win over the Blue Jays on Wednesday.
"Anytime you lose games when you're up it's hard," Lowrie said, "especially this time of the year whenever you win means so much."
At the time, it looked like it would be enough for pitcher Josh Beckett, who left with the lead despite struggling in only five innings of work. He gave up three home runs of his own, including consecutive homers to Michael Young and Josh Hamilton to lead off the fifth inning. Beckett gave up six runs on 10 hits with four strikeouts in all.
"It's a shame I couldn't go out and do better than I did in the fourth and fifth innings," Beckett said. "Wakefield should have never been in that situation at all if I had done my job."
Even after the Rangers pulled within two runs at 8-6, Drew once again helped the Red Sox distance themselves with another solo homer with one out in the seventh.
But the Rangers rallied after that, sending them to their fourth win in their last five games against the Red Sox.
"I thought we swung the bat well," Drew said. "We just go out there and play again tomorrow. Try to keep things rolling on the offense and see what happens."
Chris Cox is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.