In 2005, his first season as a Met, Martinez posted a 15-8 record with a 2.82 ERA, 208 strikeouts, and a league-leading 0.95 WHIP. Opponents batted .204 against him. As in 2002, he was again shut down before the end of the season because of nagging injury.
Martinez started the 2006 season at the top of his game. At the end of May, he was 5-1 with a 2.50 ERA, with 88 strikeouts and 17 walks and 44 hits allowed in 76 innings; Martinez's record was worse than it could have been, with the bullpen blowing leads for him, and with one of the games being a matchup with the Arizona Diamondbacks. Beginning on June 6, Martinez went 4-7 with a 7.10 ERA in a series of spotty starts interrupted twice by stays on the disabled list.
Martinez was able to return to the mound for the Mets in September 2007, starting five games and finishing 3-1 with a 2.57 ERA. He collected his 3000th career strikeout during his first start back.