Aaron Judge drove in two runs for New York, which had lost eight of its previous 10 and won despite going 2 for 15 with runners in scoring position and stranding 11.
''We haven't been hitting homers as much as we normally do or putting up crooked numbers as much as we do,'' Yankees manager Aaron Boone said. ''Sometimes it takes little things in a game to win a ballgame. Tonight's that kind of game where everyone kind of contributed in different ways.''
Jonathan Loaisiga (5-2) pitched 1 1/3 perfect innings in relief of New York starter Jordan Montgomery.
Taylor Rogers (2-3) allowed two runs on three hits in the eighth for Minnesota.
''It's not like they were hitting the ball around the ballpark,'' Twins manager Rocco Baldelli said. ''As we've talked about, sometimes it really doesn't come down to that. It comes down to trying to have a good at-bat, use the whole field, things we talk about a lot. We saw it happen against us out there tonight.''
The 95-degree temperature at first pitch was the second-hottest for a game at Target Field, only eclipsed by a 97-degree start on July 16, 2012.
New York took advantage of several Minnesota mistakes.
Tyler Wade scored the go-ahead run on LeMahieu's fielder's choice in the eighth as second baseman Jorge Polanco's throw was wide of the plate for an error. The Twins committed four errors in the game.
''Playing fundamental baseball is something we're going to have to do in order to stay in ballgames, win ballgames,'' Baldelli said. ''Teams that play good baseball, they win games, ultimately. But I'm not concerned about the particular plays we saw today mainly because of why. We were trying to stay in the ballgame.''
Judge was walked with the bases loaded in the fifth and another run scored on a wild pitch. Judge earned another RBI as he beat a throw on an attempted double play and an error was charged to shortstop Andrelton Simmons after a review showed he didn't touch the base on the turn.
''With the off-day yesterday and then obviously coming on the road, just trying to almost turn things over and start over anew with the game today,'' said Yankees outfielder Brett Gardner, who had a sacrifice fly for an RBI and a sacrifice bunt. ''It definitely can do that and build some momentum. ... Hopefully, we look back and tonight was the start of something special.''
Montgomery gave up two runs on three hits in the first, culminating in a two-run double by Ryan Jeffers. But he settled in and ultimately gave up three runs in 5 2/3 innings.
Michael Pineda started for Minnesota and had retired 11 batters in a row after a double by LeMahieu to start the game. But he gave up a walk and two hits with one out in the fifth and his night ended with the bases-loaded walk to Judge.
Yankees: LHP Zack Britton (left elbow bone spur) had his rehab assignment transferred from Double-A Somerset to Triple-A Scranton/Wilkes-Barre and allowed four runs while getting one out Tuesday. He was slated to pitch there again Thursday. ... OF Ryan LaMarre (right hamstring strain) commenced a rehab assignment at Triple-A on Tuesday. ... Boone said 1B Luke Voit (right oblique strain) is increasing his workload swing-wise and could potentially start a rehab assignment in a week.
Twins: OF Byron Buxton (right hip strain) began a rehab assignment with Triple-A St. Paul. Buxton was the designated hitter and will play in the outfield on Wednesday. Baldelli said Buxton could play at least three rehab games, with two in the outfield. ... RHP Kenta Maeda (adductor strain, general arm soreness) is scheduled for a rehab start at Triple-A on Wednesday and is expected to throw about 50 to 55 pitches. ... DH Nelson Cruz missed his second straight game with left knee stiffness. ... OF Rob Refsnyder was reinstated from the seven-day injured list before the game after recovering from a concussion. He left in the sixth with left hamstring tightness after an RBI double.
Gerrit Cole (6-3, 2.26 ERA) starts Wednesday for New York in his first outing since Twins third baseman Josh Donaldson wondered publicly whether the Yankees right-hander might have been trying to hide his usage of illegal foreign substances to doctor the baseball. RHP Randy Dobnak (1-5, 6.19) starts for Minnesota.
More AP MLB: https://apnews.com/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.