Martinek had one goal and nine assists in his first 51 games this season, his fourth in the NHL -- all with New York.
The deal, which will pay him about $700,000 per season, was announced just before the Islanders faced the New Jersey Devils at home for the second time in six days. On Monday, the team inked forward Shawn Bates to a three-year deal.
Both players could've become unrestricted free agents at the end of the season.
"Radek has been a very steady defenseman for us the last four seasons and he's only gotten better as he's made the adjustment to North America and the NHL game," Islanders general manager Mike Milbury said. "Like Shawn Bates, Radek expressed to us that wanted to stay an Islander, so we came up with a fair contract rather quickly."
In 188 career games, the 29-year-old native of the Czech Republic had eight goals and 27 assists. Martinek was chosen by the Islanders with the 228th pick in the 1999 NHL draft.
"It feels great to have a deal done before the end of the season and know I'm an Islander for at least the next two years," said Martinek, who is earning $575,000 this season. "The franchise has been good to me and I really enjoy Long Island. It was important to me to stay an Islander."