Ortiz hit a pair of two-run homers, including his 400th shot in a Red Sox uniform, and drove in a career high-tying six runs to power Boston past the Houston Astros 10-7 on Saturday night.
Big Papi joined Hall of Famers Ted Williams and Carl Yastrzemski as the only players to hit 400 homers while playing with the Red Sox. Ortiz did it with his drive into the first row of the center-field seats in the third inning.
"It's an honor to be mentioned with those legends that were with the Red Sox," he said. "When you come to this organization to play, you're not expecting to be mentioned with those guys."
The left-handed slugger has joined a class that features two of the greatest players to wear a Boston uniform.
"He's in rare company with those two other guys he's linked to," Red Sox manager John Farrell said.
After his 400th, Ortiz hooked his other homer around the Pesky Pole in right field in the fifth. He has 459 home runs in his career, which started with Minnesota.
He then lined a two-run double into the gap in front of the Green Monster in the eighth. He left to a standing ovation for a pinch runner, tipping his helmet as the crowd gave him a curtain call.
"David Ortiz is a Hall of Famer. He's about as good as it gets in this game," Astros manager Bo Porter said.
Williams hit 521 homers, and Yaz had 452. Both spent their entire careers with the Red Sox.
Chris Carter hit a solo homer and added a sacrifice fly for the Astros, who lost for the fifth time in seven games. A day earlier, Houston earned the franchise's first win in Fenway Park after going 0-8.
The Red Sox trailed 6-3 before scoring four in the sixth. Ortiz's second homer off starter Brad Peacock sliced it to 6-5, and Daniel Nava's sacrifice fly tied it. Jackie Bradley Jr. had a sacrifice fly off Josh Fields (2-6) to push Boston ahead.
The Astros built a 5-1 lead against Rubby De La Rosa by scoring two in the first, one in the second and two in the third.
Leading 3-1, Gregorio Petit had a two-run double.
After Ortiz's first homer cut Houston's lead to 5-3, Carter homered over the Monster in the fourth.
"One of the best players in baseball," Peacock said of Ortiz. "The first homer, it was a hanging changeup, bad 0-2 pitch, and he just did what he's supposed to do with it."
Ortiz has 91 RBIs, giving him at least 90 for the 10th time in 12 seasons with the Red Sox. One other he finished with 89, and in 2012 he had 60 while played just a little over half of an injury-plagued season. It was his 45th career multihomer game and fourth this season.
FENWAY SUCCESS RUNS OUT
De La Rosa had allowed three or fewer runs in each of his Fenway starts this season -- and one or none three times. He gave up six on nine hits in just four innings.
Astros: Porter said OF Alex Presley (strained right oblique) will be shut down for "seven to 10 days" after feeling discomfort during his minor league rehabilitation assignment at Tri-City of the New York-Penn League. Porter also said LHP Darin Downs, dealing with oblique soreness but still on the active roster, will "need a couple of more days."
Red Sox: 2B Dustin Pedroia was back in the lineup after leaving Friday's game after fouling a ball off his right foot. OF-1B Allen Craig, on the DL with a sprained left foot, is expected to start a rehab assignment, beginning Monday with Triple-A Pawtucket. He did some running during batting practice with a member of the team's medical staff watching. C David Ross (plantar fasciitis) is expected to be activated early next week.
RHP Collin McHugh (5-9, 3.08 ERA) is scheduled for Houston on Sunday. RHP Joe Kelly (0-0, 2.08) is slated to make his Fenway debut with the Red Sox. He was acquired at the trade deadline from St. Louis along with Craig for RHP John Lackey.
The Red Sox had a moment to honor Maj. Gen. Harold "Harry" J. Greene, who was killed in Afghanistan earlier this month. He was born in Boston and was a big Red Sox rooter. His family wore Red Sox jerseys and stood on top of the dugout when his picture was shown on the center-field scoreboard after the fifth inning. They received a standing ovation. Greene, the highest-ranking U.S. military officer killed in combat since the Vietnam War, was buried with full honors Thursday at Arlington National Cemetery.