Chase Utley and Carlos Ruiz hit consecutive home runs in the seventh inning as the Phillies rallied from a 2-0 deficit. Ty Wigginton's two-run homer in the ninth capped the surge.
Lee (1-5) had gone a puzzling 13 starts this year without a victory, a big reason the five-time NL East champions have fallen far behind. The lefty ace hadn't been awful, nor had he been consistently good.
Facing the Mets for the fourth time this season, Lee came out sharp and struck out three of the first four batters. He wound up going eight innings and struck out nine, most of them looking.
Lee's drought was the longest by a former Cy Young winner since Greg Maddux went 14 starts without a win in 2008 with San Diego - the worst skid for a Cy winner was 19 starts by Fernando Valenzuela in 1988-89, STATS LLC said.
Lee seemed as if he might wind up loss column again after the Phillies managed just two singles in the first six innings against Chris Young (2-2). Juan Pierre led off the seventh with a sharp single and Utley followed with a tying drive into the right-field seats, his second homer since missing nearly three months because of knee trouble.
Ruiz, set to play in his first All-Star game, then put the Phillies ahead with his 13th home run.
Philadelphia pulled away with a three-run eighth against the Mets' bullpen. Jimmy Rollins doubled home a run, Ruiz hit an RBI single and Wigginton hustled home from second on Hunter Pence's single off shortstop Ruben Tejada's glove. Rollins added an RBI grounder and Wigginton homered in the ninth.
A day after routing the Phillies 11-1, the Mets lost for the second time in seven games. Philadelphia also managed to stop its seven-game road losing streak.
Scott Hairston put the Mets ahead with a solo homer in the fourth, lining an 0-2 pitch over the left-field wall. As Hairston rounded the bases, Lee scuffed at the dirt and looked out toward center field, where a replay of the pitch was playing on the videoboard.
The Mets, as they've done all season, strung together some two-hits and made it 2-0 in the fifth. David Wright drove in the run with a single.
NOTES: Pierre stole his 20th base, the 12th straight year he's reached the mark. His 574th career swipe tied Hugh Duffy for 22nd place. ... Daniel Murphy was hit in the left leg by Hairston's hard grounder while leading off third base in foul territory. ... Mets OF Kirk Nieuwenhuis didn't play. He was a late scratch from the lineup the previous day after hurting his right hand while swinging in batting practice. He said his hand was feeling better Wednesday. ... Mets knuckleballer R.A. Dickey goes for his 11th straight win on Thursday night vs. Phillies LHP Cole Hamels. Dickey leads the majors with 12 victories and could start the All-Star game next Tuesday. ... Phillies 1B Ryan Howard (left Achilles) was set to have a day off with Triple-A Lehigh Valley in his rehabilitation assignment. He homered Tuesday night. ... Miss America Laura Kaeppeler sang the national anthem, wearing her crown and a Mets jersey.