Shaw, who entered as a defensive replacement in the eighth, drove a 3-2 pitch off Dennis Santana (2-3) over Boston's bullpen. He flipped his bat and looked at the dugout before rounding the bases and getting mobbed at the plate.
It was Shaw's first hit since he was claimed off waivers from Milwaukee on Aug. 15. He also began his big league career with the Red Sox in 2015.
''It's pretty cool,'' Shaw said. ''As the years have gone, you think there's a lot of things that have happened in my career and you think about moments and things that surprise you, and something like that happens.''
Asked if he knew it was gone, he said: ''Yeah, I knew that was gone. That was a good one.''
Alex Verdugo and Hunter Renfroe also homered for Boston in the makeup of Sunday's scheduled game, which was postponed due to the approach of Hurricane Henri. Garrett Whitlock (5-2) worked 2 2/3 innings for the victory.
The Red Sox committed a season-high five errors and had two baserunners cut down in a 10-1 loss on Saturday night. Manager Alex Cora called that game ''embarrassing'' and ''not acceptable.''
On Monday, Shaw helped them overcome a blown lead in the ninth.
''Huge hit,'' Cora said. ''That was a huge swing for us.''
The Rangers have the majors' fewest wins since the All-Star break at 8-26. Andy Ibanez hit a tying two-run double in the ninth against Matt Barnes.
''There was some good, obviously,'' Rangers manager Chris Woodward said. ''We fought, we battled, we didn't quit. We made some mistakes I thought were critical to us (trailing) before the double.''
The Red Sox wasted seven dominant innings by Nathan Eovaldi, who allowed an unearned run and four hits.
The Red Sox had a pregame players meeting.
''We had a meeting. That stuff stays in the clubhouse,'' Eovaldi said. ''We were able to get some things off our chest.''
Barnes loaded the bases before Ibanez's drive to right-center bounced into Boston's bullpen. Whitlock relieved and struck out the next two batters to end the threat.
Nathaniel Lowe's RBI single through the shortstop hole against Whitlock scored Yonny Hernandez in the 10th, but Rafael Devers hit an RBI double into the triangle in center, tying it with two outs in the bottom half.
Verdugo drove a first-pitch curveball from Kolby Allard into Boston's bullpen for a two-run shot in the second. It was Verdugo's 12th homer, matching his career best.
''I definitely didn't feel as in sync as I did in the last few,'' Allard said of his start on seven days' rest.
Renfroe made it 3-1 with a solo shot in the sixth, sending a drive into the Green Monster seats.
Boston committed two errors in the fifth: Third baseman Devers juggled the ball before dropping it trying to throw to first, and first baseman Bobby Dalbec had a throw tick off his glove.
Allard gave up three runs in six innings.
HE'S OUT THERE
Kyle Schwarber played left for the Red Sox for the first time since being acquired from the Nationals at the trade deadline. He hadn't played in the field since straining his right hamstring on July 2.
He made a heads-up play in the fifth, covering second when the Rangers tried a safety squeeze that turned into a 1-2-5-7 double play after Hernandez bunted right back to Eovaldi and headed for second with a baserunner already there.
Rangers: RHPs Drew Anderson and Mike Foltynewicz were placed on the COVID-19 injured list along with INF Brock Holt. LHP Wes Benjamin and INF Curtis Terry were recalled from Triple-A Round Rock. ... RHP Kohei Arihara started and pitched two scoreless innings for Double-A Frisco on Sunday in his first rehabilitation outing since being placed on the injured list on May 9. He underwent surgery to repair an aneurysm in his right shoulder.
Red Sox: Reinstated INF Christian Arroyo from his rehab assignment at Triple-A Worcester and optioned INF Jonathan Arauz there. Arroyo had been sidelined by a strained left hamstring.
Rangers: LHP Taylor Hearn (2-4, 3.97 ERA) is scheduled to start the opener of a three-game series in Cleveland on Tuesday night. RHP Eli Morgan (2-5, 5.80 ERA) is set for the Indians.
Red Sox: Cora hasn't announced a starter yet for Tuesday's series opener against Minnesota at Fenway Park, but it's likely going to be RHP Tanner Houck (0-3, 3.12 ERA). RHP Griffin Jax (3-1, 5.11 ERA) gets the ball for the Twins.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.