When a creature blocks an attacker, that attacker becomes 'blocked' — and this status does not change even if the blocking creature later leaves the battlefield before combat damage is dealt. This is established by CR 509.1h, which states that a creature remains blocked even if the blocker is removed from combat.
Combat damage is assigned during the Combat Damage Step (CR 510). By the time we reach that step, if the blocking creature is already dead (e.g., killed by a spell during the Declare Blockers Step or before damage is assigned), the attacking creature still has no legal target to assign its damage to — but it is still 'blocked.' A blocked creature without trample cannot assign any damage to the defending player (CR 510.1c).
The key exception is trample (CR 702.19). A trampling attacker may assign its excess combat damage to the defending player even if the blocker is dead, treating the blocker as having 0 toughness remaining for the purposes of damage assignment.
Concrete example: Your 5/5 Grizzly Bear (no trample) attacks. Your opponent blocks with a 1/1 Soldier, then casts Lightning Bolt on the Soldier, killing it before damage. Your 5/5 is still 'blocked' — it deals its 5 damage to nothing, and the opponent takes 0 damage. If your creature instead had trample, it could assign all 5 damage to the defending player.
So the attacking creature 'deals' its damage only in the sense that it would assign it — but with no living blocker and no trample, that damage simply has no recipient and the defending player is safe.
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.