When a creature with trample is blocked, trample's damage-assignment rules lock in at the damage assignment step (Combat Damage Step). However, the key interaction happens because of CR 702.19b: a creature with trample must assign damage equal to the blocker's lethal damage threshold before assigning damage to the defending player or planeswalker.
If the blocking creature is sacrificed (or otherwise removed from combat) after blockers are declared but before damage is assigned, it is no longer on the battlefield. Per CR 509.2, a creature that has been removed from combat during the combat phase is no longer blocking, but crucially, the attacker is still considered 'blocked' (CR 509.1h). This means the attacker cannot deal damage to the player unless it has trample.
With trample, CR 702.19b requires assigning lethal damage to each creature blocking it. A creature that has left the battlefield has 0 toughness remaining for this purpose (it has already been assigned 0 damage and needs 0 to be 'lethal'). So the trample creature may assign 0 damage to the removed blocker and redirect ALL its damage to the defending player.
Concrete example: Your 5/5 trample Charging Elephant is blocked by your opponent's 2/2 Grizzly Bears. In response, the opponent sacrifices the Bears to an effect. The Elephant is still 'blocked' but the Bears are gone. The Elephant assigns 0 damage to the Bears (lethal damage needed = 0) and all 5 damage tramples through to the opponent.
References: CR 702.19b governs trample damage assignment; CR 509.1h explains that blocked status persists even if the blocker leaves; CR 510.1c covers damage assignment order for trample creatures.
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.