Konstantin Zyryanov fired Zenit ahead against the run of play in the 63rd minute with a low shot but the Russians were ahead of the Cypriots for just 10 minutes.
APOEL swiftly rebounded when Manduca levelled after a scramble and Ailton sparked wild celebrations among the 18,000 APOEL fans by finding the net just minutes later.
Zenit's Bruno Alves was sent off in the 76th minute.
APOEL coach Ivan Jovanovic said the result exceeded his expectations.
"I would be exaggerating if I said we had high hopes in this group, with these opponents," he told reporters. "But we deserved to win and my players played well."
Zenit FC tried to control the tempo of the game but failed. "They were a very fast team," said Zenit coach Luciano Spalletti of APOEL.
"Now we have to try to address some issues and do better in the coming games."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.