UEFA Europa League: Porto 1 Napoli 0
Porto dominated for large parts of Thursday's game, but a combination of an incorrect offside decision that ruled out Carlos Eduardo's effort and the outstanding Pepe Reina frustrated them.
There was nothing Reina could do, though, to stop Martinez netting the only goal at the Estadio do Dragao after he reacted quickest to sweep home from 12 yards.
Martinez's 23rd goal of the season in all competitions means Porto travel to Italy for the second leg next week with high hopes of reaching the quarter-finals.
Porto ended a four-game winless run in all competitions at the weekend with a confidence-boosting 4-1 victory over Arouca and bossed the first half against Napoli with ease.
In what was the first European game in charge for interim coach Luis Castro, Porto would have been ahead early on but for a remarkable save from Reina.
Eduardo chipped a delightful ball to Martinez and he met it sweetly on the half-volley, but Reina showed great reflexes to tip away the shot.
The 2010-11 Europa League winners continued to have the best of proceedings, with Steven Defour next to sting the palms of Reina.
Castro's men should have been in front after 19 minutes when Martinez's inviting cross was nodded in by Eduardo, only for it to be incorrectly ruled offside.
The pattern of dominance continued in the early exchanges of the second half when Reina produced another superb stop to acrobatically claw away Fernando's rasping 30-yard drive.
Ricardo Quaresma scored two goals at the weekend and impressed again but his 50th-minute strike drifted wide.
Rafael Benitez is aiming to become the first manager to win the competition with three different clubs and his side finally showed some attacking intent after 52 minutes.
Napoli broke the offside trap and Jose Callejon set up Gonzalo Higuain, whose shot was low and powerful but went through Helton's legs and squirmed wide.
The Porto goalkeeper was in action again when Raul Albiol was left unmarked from a corner, but his low header was kept out by the feet of the Brazilian.
Helton brilliantly denied Higuain and the ball fell to Callejon six yards out, but he could not sort his feet out.
But the game swung Porto's way after 57 minutes when a corner was only half-cleared and Martinez showed great technique 12 yards out to lash home via a deflection.
It somehow stayed as 1-0 to the hosts with nine minutes remaining when Miguel Britos made a last-ditch tackle and his clearance from the floor cannoned straight off Juan Quintero and onto the post.