Selangor PKNS who needed a win to keep their hope of advancing to the next round alive, started with former Malaysian international and former Bayern Munich youth player Rudie Ramli in attack alongside Guadeloupe international Michael Nicoise.
But neither Rudie nor Nicoise would get on the score-sheet as both were constantly denied by the superb bravey and performance of Izwan Mahbud in goal for the visitors.
PKNS were on the verge of elimination of the Malaysia Cup after Nicoise missed from the spot five minutes before the end of regulation time.
But Helmi Loussaief would turn hero as he struck two minutes into injury time to prolong his team's journey in the campaign.
Nicoise kept Izwan busy early on as he sent a freekick over the wall and on target but the Singapore custodian was on hand to keep the score goalless.
Midway through the first half, LionsXII came close twice to scoring but poor finishing was to let them down. A long ball from Hariss into PKNS' penalty box was knocked away by Zulharis Nor and Amri was always present to pounce on the loose ball but his low driven shot trickled inches away from goal.
Minutes later, Shaiful Esah sent in a curling corner to the far post but Hariss could only see his header hit the side netting.
After the restart, Amri cleverly laid off the ball for Shahdan whose shot took a bump along the way and swerved away from goal at the crucial moment.
PKNS were given a lifeline five minutes before the end after Irwan Shah was adjudged to have brought down Nicoise in the penalty box.
Nicoise from the spot sent a stinging shot on target but Izwan did brilliantly to palm the ball away to safety.
LionsXII's joy was however short-lived as former Tunisian U-22 player, Helmi Loussaief was given space to roam inside the penalty box in injury time before sending the ball beyond the helpless Izwan.
LionsXII will play their last Group A match against Johor FC at the Jalan Besar stadium on September 14, while PKNS will be looking for victory against Johor FA to secure a quarter final spot.