Northern Ireland have decided not to risk the fitness of the frontman, who picked up a knee injury against Poland at the weekend.
A statement from the Irish Football Association read: “The 21-year-old underwent a scan yesterday on a knee injury sustained in the 1-1 draw against Poland.
“He was then assessed this morning by the team’s medical staff and it was decided that no risk would be put on the player nor Glasgow Rangers or Northern Ireland – he has therefore been withdrawn from the squad for Wednesday’s game.
“Lafferty will return immediately to his club.”
Lafferty impressed against Poland but limped off after making the breakthrough at the Slaski Stadium with a superb goal in the first half.
Manager Nigel Worthington was sufficiently concerned by the injury to draft 18-year-old Billy Kee into the squad.
Lafferty indicated on Monday he might be fit to take on Slovakia, but that has not proved the case.
Northern Ireland would move into top spot in Group Three with victory over the Slovakians.