You can cast a spell using beam me up even if it was somehow put into your graveyard without having been cast.

Artwork
Loading artwork…
Boarding Action
Star Trek · #139 · EN
Nonfoil—Foil—
Card rules
Create a 2/1 red Klingon Warrior creature token with haste.
Beam me up 2
(You may cast this card from your graveyard for 2
if you also return a creature you control to its owner's hand. Then exile this spell.)
A warrior's blood boils before the fire is hot. —Klingon proverb
Common · Illustrated by Douglas Shuler
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You must still follow any timing restrictions and permissions, including those based on the card's type. For instance, you can cast a sorcery using beam me up only when you could normally cast a sorcery.
To determine the total cost of a spell, start with the mana cost or alternative cost (such as a beam me up cost) you're paying, add any cost increases, then apply any cost reductions. The mana value of the spell is determined only by its mana cost, no matter what the total cost to cast the spell was.
A spell cast using beam me up will always be exiled afterward, whether it resolves, is countered, or leaves the stack in some other way.
If a card with beam me up is put into your graveyard during your turn, you can cast it if it's legal to do so before any other player can take any actions.
"Beam me up [cost]" means "You may cast this card from your graveyard by paying [cost] and returning a creature you control to its owner's hand rather than paying its mana cost" and "If the beam me up cost was paid, exile this card instead of putting it anywhere else any time it would leave the stack."