The Egyptian striker headed home the equaliser on 33 minutes after Pompey had taken the lead against the run of play and then tapped home after Jermain Defoe handed his second on a plate.
But he had to pass a late fitness test to take his place in the starting line-up after suffering a groin injury on Friday.
He limped off just after the hour to be replaced by Robbie Keane who then lobbed home the goal of the game to secure the three points.
Head Coach Martin said: "We didn't think he would start. He had a groin problem, it was a worry but he did a late test and came through it.
''I thought he could play for 45 minutes, but he scored twice and you couldn't ask for more.
"He's a terrific lad and a great character. I'm delighted with him. When I said he was the fourth striker everyone thought it was a pecking order and the fourth, but I meant we needed four strikers.
"It is good for the fans now because they realise we have luxury problems up front.
"After every game I get letters from fans saying Robbie Keane should play, Jermain Defoe should play, Fredi Kanoute should play, but you can't play them all.
"Andy Reid also did well on his debut and you worry a bit how new players will cope with The Premiership.
"This was a big win for us. It's all about confidence and we want to have a good spell again."
Martin Jol was delighted with Mido's magnificent debut - but revealed the two-goal hero almost didn't make it against Portsmouth.