Inter are level with Borussia Dortmund on seven points each in Group F topped by Barcelona who clinched a last-16 spot after beating the Germans 3-1 at the Camp Nou.
“The win is important for us, we had no choice but to win,” said Inter coach Antonio Conte.
“We knew what to expect, the forward duo were decisive and I’m very happy for them,” he added.
In the last round of games on December 10, Inter face Barcelona at the San Siro while Dortmund host Slavia.
“We gave meaning to this match against Barca by winning,” said Conte.
“We are expecting a great match, hard, but we know that we can count on 80,000 people who will come to the stadium to push us. That was what we wanted.”
Martinez opened the scoring on nineteen minutes after Lukaku had picked up a pass, fought off two challenges and took the ball into the box before cutting it back to the unmarked Argentinian.
Martinez scored for the fourth consecutive Champions League game for Inter.
Tomas Soucek levelled for Slavia from the penalty spot in the 37th minute after Stefan de Vrij had brought down striker Peter Olayinka in the box.
Polish referee Szymon Marciniak first ignored the foul and let play continue with Lukaku scoring on the counter-attack before seeing his goal chalked off as the video referee took centre stage.
Lukaku added Inter’s second nine minutes from the end after Slavia’s last man Michal Frydrych slipped and let him round keeper Ondrej Kolar.
Martinez then volleyed home his second as Lukaku robbed the Slavia defence and provided him with a superb cross in the 88th minute.
– ‘Two excellent forwards’ –
Outside of the four goals, Slavia had the first sight of the target on five minutes when Josef Husbauer narrowly missed with a header.
Inter’s first shot came from Martinez whose low shot across the goal narrowly went the wrong side of Kolar’s left post.
After Inter’s opener, Slavia put the Nerazzurri under pressure, but Frydrych headed wide and Lukas Masopust just missed the top left corner of Samir Handanovic’s goal.
Inter were on the front foot early into the second half, but they failed to produce a decent chance at first.
On the other side, Handanovic had a hard time clearing a deflected Masopust shot over the crossbar and Slavia’s second-half substitute Ibrahim Traore missed narrowly.
Moments later, Lukaku sent his header onto the crossbar and Marcelo Brozovic then followed suit with a volley halfway into the second half.
Five minutes later Masopust intercepted a pass and sprinted down the centre but failed to beat Handanovic one-on-one.
“The game went the wrong way, we had many losses during the game and Inter, leaning on two excellent forwards, could capitalise on that,” said Slavia coach Jindrich Trpisovsky.
“Inter’s performance improved in the second half and ours was getting worse. In fact, they could have scored the decider much earlier.”