An All-Star second baseman for Boston in 2006, Loretta signed with Houston as a free agent in January 2007.
He also hit a three-run homer on Saturday in the Astros' 11-10 win, but said the hits carried no extra satisfaction because of the opponent.
"It doesn't matter. I have a lot of respect for them and a lot of friends over there," said Loretta. "I'm just glad we won another series and get some momentum going again."
Loretta batted for Doug Brocail (4-3), who earned a victory in relief for the second straight night.
Jose Valverde shut out the Red Sox in the ninth to earn his 21st save as the Astros took two of three in Boston's first series in Houston. The Astros have won six of nine games after dropping 13 of their previous 16.
"That's as good a team as we've played all year and to win a series from them is meaningful," Loretta said. "We still have a long way to go. We have not played well in June."
Josh Beckett, who was born and raised in nearby Spring, Texas, gave up two runs on eight hits, but took his third no-decision in six starts.
Manny Ramirez tied the game in the seventh with a solo homer off Oscar Villarreal. Dustin Pedroia hit a solo homer off Houston starter Brian Moehler earlier and went 9-for-14 in the series. Pedroia has 24 hits in his last 45 at-bats spanning 10 games.
But one night after scoring 10 runs, the Red Sox couldn't muster enough offense to avoid falling to 2-10 in one-run games on the road. Boston stranded 13 runners on Sunday, one shy of a season high.
"We really left a lot of guys on base," said Jason Varitek, who went 0-for-3. "We just weren't able to get the extra runs."
Okajima gave up a run in relief for the second time in three nights. Boston's bullpen had allowed just one run in its previous 13 innings before the Astros scored five on Saturday night and the game-winner on Sunday.
The Red Sox slipped one-half game behind Tampa Bay in the AL East heading into a three-game series with the Rays, starting Monday. The Rays beat Pittsburgh on Sunday and took over first place for the first time since June 3.
"We were down there earlier and it was close," Varitek said. "When they came to our place it was close, so we have to go out there worry about ourselves."
Geoff Blum, making a rare start, gave Houston a 1-0 lead in the second with a solo homer to right, his fifth of the season. Beckett hadn't given up a home run in four starts.
Pedroia tied it in the third with a leadoff homer to left, his fourth home run in his last 15 games.
Houston took a 2-1 lead in the fifth on Lance Berkman's RBI single. Michael Bourn reached on a fielder's choice and Hunter Pence beat out an infield hit before Berkman singled to center, his 67th RBI of the season.
Moehler hit 100 pitches for the first time this season in the sixth.
Varitek drew a one-out walk and went to third on Julio Lugo's single to right. Moehler struck out Beckett on pitch No. 111 before manager Cecil Cooper replaced him with left-hander Wesley Wright. Moehler tipped his cap to the cheering crowd as he walked to the dugout.
"I felt good, I felt strong," Moehler said. "I don't know how I'll feel tomorrow. I felt all right today."
Lugo stole second and Wright walked Jacoby Ellsbury to load the bases. Pedroia was next, but Wright struck him out on three pitches, prompting a fist pump from catcher Humberto Quintero as the Astros came off the field.
Wright struck out J.D. Drew in the seventh, but Cooper brought in the right-handed Villarreal to face Ramirez. The Boston slugger hammered a 1-2 pitch into the Astros bullpen, his 16th home run of the season.
David Aardsma (2-2) relieved Beckett in the eighth and Tejada singled with one out.
Tejada went to second on a wild pitch and Francona brought in Okajima. He got Blum to ground out, but Loretta singled up the middle, his fourth RBI of the series.
Ramirez has 506 career homers. ... Blum started at second base for the second time this season. ... Boston had won its last nine interleague series since losing two of three to the Cubs in June 2005. ... Beckett went 0-for-3 with two strikeouts at the plate. Boston's pitchers went 0-for-25 with 18 strikeouts in interleague play.