The Qatar-based midfielder set up the only goal three minutes after half-time at the national stadium in Rades.
The Qatar-based midfielder set up the only goal three minutes after half-time at the national stadium in Rades on the outskirts of Tunis.
Msakni intercepted a headed clearance and delivered a sublime through ball for Taha Yassine Khenissi to score from a tight angle.
The result confirmed the recent dominance of Tunisia over 2017 Cup of Nations runners-up Egypt having beaten them home and away in 2015 qualifying.
Tunisia top Group J with three points and Niger and Swaziland have one each after a 0-0 draw in Niamey at the weekend.
Group winners and the best three runners-up from 12 mini-leagues qualify for the biennial African football showcase.
New Spain-born Algeria coach Lucas Alcaraz saw Sofiane Hanni score midway through the opening half to bring a 1-0 Group D win over Togo in Blida.
The match-winner was the highlight of a generally laboured performance by the nation that reached the last 16 at the 2014 World Cup in Brazil.
Route-one football presented unmarked Hanni with a chance just outside the box and his delicate chip over the goalkeeper found the net.