Azam defender Jockins Atudo netted the opener in the first half through a penalty before AFC Leopards striker Allan Wanga added a second in the second half through a stunning strike.
Atudo scored in the 5th minute through a penalty after Francis Kahata was hacked down in the area after a fierce counter attack initially rebuffed by the Zanzibar defence.
Harambee Stars should have raked in more goal in that first half after starting off on a high pace. Allan Wanga crashed his shot against the woodwork in the second minute in an attack that eventually led to the penalty.
Jacob Keli should have stretched the lead for the CECAFA hosts after managing to waylay a Zanzibar defender and snatching the ball. He however shot straight to the keeper after turning the defender inside out.
Stars were obviously the better side in the first half though Zanzibar also hit back with three crucial chances evading them. Masoud Ali's freekick flew over the bar after Atudo had brought down a Zanzibar striker at the edge of the area.
The best chance for Zanzibar was through Seleiman Kassim who hit the side netting after beating the Kenyan defenders and rushing through the left flank.
Stars started the second half still on a high with Keli missing a chance in the 47th minute after dancing through the Zanzibar defence before eventually losing the ball from a Peter Opiyo cross.
Allan Wanga brought the stadium to life again with his 57th minute cracker from the edge of the area after controlling a Jacob Keli cross on the right and finding space to shoot.
Noah Wafula was having a bad day in office and was pulled out for more effective Miheso. Keli had a one on one chance with the keeper ten minutes later but his shot, with only the keeper to beat went wide from close range.
Duncan Ochieng' was then sent into frantic save from a Masood Omar goal bound shot as the team attempted to bounce back but the Stars defenders stood tall.
Zanzibar also reinforced their defence ensuring that Stars did not find room despite bringing in Paul Kiongera and David Kingatua from the bench in the last quarter of the match.
Stars and Ethiopia, who won in the earlier match, are tied in points and goal difference. The teams are already however assured of a lace in the next round.