Undying reads: 'When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.' The condition — having no +1/+1 counters — is checked as the creature last existed on the battlefield (i.e., the moment it died), not at some earlier point in the game.
This is governed by CR 603.6 and CR 700.7 (the 'last known information' rule). When a triggered ability checks a condition about a permanent that just left the battlefield, the game uses that permanent's last known state before it moved to the graveyard. If the creature had even a single +1/+1 counter at that moment, the undying condition fails and the ability does not trigger at all.
It is important to note this is a trigger condition, not an effect that can be responded to. If the creature died with a +1/+1 counter, undying simply never goes on the stack — there is no window to try to remove the counter after death to 'save' the trigger.
Concrete example: You control a Geralf's Messenger (which has undying). An opponent casts Bioshift, moving a +1/+1 counter onto your Messenger before you sacrifice it to an altar. When the Messenger dies, it already has a +1/+1 counter, so undying's condition is not met and the Messenger stays in the graveyard.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.