The American League Central-leading Twins have lost four in a row, all to National League teams after a sweep by Milwaukee before arriving in New York, for the first time this season.
Pelfrey (10-2) did not walk a batter and bounced back from what had been his first loss since May 2. Francisco Rodriguez worked the ninth for his 17th save.
Denard Span hit a solo homer for Minnesota in the first, but the Mets took the lead with a three-run fourth.
Wright doubled home the first run of the inning and put New York in front for good when he scored on a throwing error by Span in center. Wright also hit a solo home run in the sixth, his 13th of the season.
Kevin Slowey (7-5) took the loss, giving up five runs on six hits over six innings. Slowey retired the first nine batters before the Mets grabbed the lead in the fourth.
The teams met for the first time in three years, when Minnesota took two out of three in New York.
Celebrity Couples of 2014 [PHOTOS]