The card will return to the battlefield under your control only if it’s still in the graveyard when Unhallowed Pact’s ability resolves. If it’s not (perhaps because an ability like undying has already returned it to the battlefield), nothing happens.

Artwork
Loading artwork…
Unhallowed Pact
Duel Decks: Nissa vs. Ob Nixilis · #64 · EN
Nonfoil—Foil—
Card rules
Enchant creature
When enchanted creature dies, return that card to the battlefield under your control.
Agreements with demons seldom end at the grave.
Common · Illustrated by Volkan Baǵa
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern 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
If Unhallowed Pact is enchanting a token creature, that creature can’t return to the battlefield.