The ability works no matter how it goes to the graveyard from the battlefield. It seeks out all creatures that damaged it during the turn and causes them to be destroyed.

Artwork
Loading artwork…
Giant Albatross
Homelands · #27a · EN
Nonfoil—Foil—
Card rules
Flying
When this creature dies, you may pay 1
. If you do, for each creature that dealt damage to this creature this turn, destroy that creature unless its controller pays 2 life. A creature destroyed this way can't be regenerated.
1/1
Common · Illustrated by David A. Cherry
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
PreDH Legal
Premodern Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Penny Not Legal
Pioneer Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
The ability is a triggered ability and is only put on the stack once just after this card goes to the graveyard.
The ability works even if the damage is redirected to the Albatross.