Ryan Madson tossed a scoreless ninth for his eighth save after Brad Lidge finished the opener, won 5-4 by the Phillies.
Tim Redding (2-6) was just as effective over six innings and retired 14 straight at one point.
Chase Utley had an RBI single in the first inning.
Martinez, who played the last four years with the Mets, signed in July for a prorated share of $2 million plus incentives. Healthy and happy, the three-time Cy Young award winner has been worth every dime.
Adding a dazzling dose of September electricity to the World Series champions, Martinez showed he still had something left in the eighth inning as he neared 130 pitches.
Martinez hit 90 mph when he fanned David Wright for the first out in the eighth and officially made it his longest outing of the year.
The 32nd straight sellout crowd chanted "Let's Go Pedro!" and wildly cheered every strike from the 37-year-old right-hander. Manager Charlie Manuel came out to chat with Martinez after he gave up a two-out double to Daniel Murphy.
The fans roared when Manuel jogged back to the dugout with Martinez still on the mound.
He caught a huge break when a changeup in the dirt scooted away from Carlos Ruiz. Murphy dashed toward third, but Ruiz recovered and threw him out to end the inning - Martinez pumping his fist as he ran off the field.
His 130 pitches are the most for Martinez since Oct. 1, 2003, in the division series for Boston vs. Oakland.
Martinez could be 7-0 if he didn't run into some bad luck with rain and have two starts cut short. He's pitched at least six innings in each of his last three starts, allowing just four runs. Martinez has a 6-2 career postseason record and would be a good fit in the Phillies rotation if they win their third straight NL East title.
They won the last two because the Mets collapsed in September each time. New York has been out of playoff contention for months, but this loss mathematically eliminated the Mets.
Redding retired 14 straight until a two-out walk to Ryan Howard in the sixth. He pitched six innings, allowed three hits and struck out three.
The Phillies scored the only run in the first when Jimmy Rollins walked, Shane Victorino singled and Utley followed with a long single off the left-field wall. They didn't get a hit off Redding after the second inning.
The Mets left the bases loaded against Martinez in the second and it cost them as they lost for the sixth time in seven games.
In the opener, Kyle Kendrick (1-1) pitched into the eighth and Victorino and Ben Francisco each homered.
Lidge, temporarily demoted from his Phillies closer role this week, gave up two runs in the ninth but finished for his 29th save in 39 opportunities.
New York right-hander John Maine (5-5) made his first start since June 6. Out with a sore shoulder, Maine was one of several key players who missed a large chunk of the season, ruining the Mets chances of competing with the Phillies for the NL East crown.
Maine (5-5) gave up an RBI double to Howard in the first of his three innings. He threw 57 pitches and gave up two hits before giving way to rookie Tobi Stoner.
Stoner gave up Victorino's first home run since Aug. 12, a two-run shot in the fifth, and put the Phillies up 4-0. Francisco had homered in the fourth.
NOTES: Mets LF Fernando Tatis left Game 2 because of a sprained left index finger. He struck out in his only at-bat. ... Phillies RHP Clay Condrey (left oblique strain) is scheduled to continue his rehab assignment Monday with Class A Lakewood. He allowed two runs on two hits in one inning for Double-A Reading on Saturday.