Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
Though it has become irrevocably associated with the series and movies, the exact phrase was never actually spoken in any Star Trek television episode or film. In the Original Series episodes "The Gamesters of Triskelion" and "The Savage Curtain", Kirk said, "Scotty, beam us up"; in the animated episodes "The Lorelei Signal" and "The Infinite Vulcan", when he said, "Beam us up, Scotty"; in Star Trek IV, saying, "Scotty, beam me up"; and in Star Trek Generations, by saying, "Beam them out of there, Scotty". The phrase was used on a bumper sticker with the tag line "Beam me up Scotty. There's no intelligent life down here."
"Beam me up, Scotty" is similar to the phrase, "Just the facts, ma'am", attributed to Jack Webb's character of Joe Friday on Dragnet, "It's elementary, my dear Watson", attributed to Sherlock Holmes, "Luke, I am your father", attributed to Darth Vader, or "Play it again, Sam", attributed to Humphrey Bogart's character in Casablanca. All four lines are the best known quotations from these works for many viewers, but not one is an actual, direct quotation.
The line has been used several times in the Dilbert comic strip.
Computer games
Astral Software's 1986 puzzle maze game, XOR, features teleportation portals inscribed with the letters "BMUS" - a reference to the phrase "Beam me up, Scotty".
In Destroy All Humans! 2, a levitated hippie will occasionally say "Beam me up, Scotty!"
In The Simpsons Game, several aliens will cry "Beam me up Scotty" at particular points in the levels of the game.
In Team Fortress 2, there is an achievement for the Demoman class named "Beat me up, scotty", a clear reference to the original phrase.
In Fallout: New Vegas, the player can complete a challenge called "Beam (Weapon) Me Up" upon inflicting a set amount of damage with laser based weaponry.
Films
The phrase has also been used in several films unrelated to Star Trek, including Armageddon.
In the early '90s film New Jack City, actor Chris Rock playing the crack-cocaine abuser explains how "beaming up to Scotty" means getting high off of crack-cocaine or heroin.
Literature
At several points in the "Young Wizards" series, Kit calls a teleportation spell a "Beam-Me-Up-Scotty".
In Stephen King's book Lisey's Story, the heroine's husband's fans use that phrase in that famous writer's meetings (his name is Scott Landon).
In Gilmore Girls, Rory tells her mother that she is "one 'beam me up, Scotty' reference away from one", referring to a murder.
The phrase is used by Sam Beckett in "Star Light, Star Bright", a 1992 episode of Quantum Leap. Scott Bakula, who played Beckett, would later star as Captain Jonathan Archer in Star Trek: Enterprise, set a century before The Original Series - in 2009's Star Trek reboot, Scotty believes he has been "exiled" to the remote Starfleet outpost where Kirk and the older Spock encounter him as punishment for losing Archer's dog in a transporter ("beaming") accident.
The phrase is used by Sergeant Baker in the series Captain Power in the form: "Beam me up, Scotty. There's no intelligent life here", after Lieutenant Ellis has made another Star Trek reference: "Let's all go boldly where no man had gone before".
The line "Beam me up Scotty" was also used in the season four episode of the TV show Bones entitled "Science in the Physicist".
In Heroes, episode 11 of season 4 "Thanksgiving", Hiro says "Must rescue Watson... Beam me up Scotty" before vanishing.
In an episode of Desperate Housewives, Lynette refers to one of Parker's nerdy friends as "beam me up scotty."
In an episode of The Middleman, guest star Kevin Sorbo says: "Maybe Scott can beam us down... ah, it's an obscure reference to a canceled television show, I'm sure you never heard of it."