Overly Pre-Prepared Gag

""Our top story today: Convicted hit man Jimmy 'Two-Shoes' McClarty confessed today that he was once hired to beat a cow to death in a rice field using only two small porcelain figures. Police admit this may be the first known case of a knickknack paddy-whack.""

- Colin Mochrie, Whose Line Is It Anyway

These are jokes that require so much setup and work behind the scenes that you would wonder why the effort was made, but you don't because it's just that funny.

Compare Massive Multiplayer Scam. Also compare Shaggy Dog Story, which is a long story or joke that seems like it will lead somewhere but doesn't; Brick Joke, which is a gag or plot element that simply comes back much later; and Henway, which is a joke specifically set up to "trap" the listener. The end result may be an Incredibly Lame Pun. If the joke is specifically a short story with a pun at the end, it's a Feghoot.

See also Disaster Dominoes, which when Played for Laughs is a slapstick gag which needs a lot of events occurring in succession.

Anime and Manga

 * In Bleach, Orihime Inoue does one of these on her friend Tatsuki. She asks to stay over because she's been "Evicted from her apartment" as of a few days before. Tatsuki is, understandably, flabbergasted and asks where Orihime's been sleeping, upon which she pulls out a squashy sleeping bag and says that it's soooo comfortable. Then she reveals that she was just kidding. Tatsuki asks her how long she'd been carrying around the sleeping bag in order to do so, and Orihime answers, "about three days, I was actually wondering if anybody was going to give me the opportunity." Of course, Orihime is a bit of a Cloudcuckoolander anyway.
 * The first chapter of Mahou Sensei Negima has a Negi falling into a rather large and complex Bucket Booby Trap that must have taken quite a while to set up. Although, given that the Negiverse has a lot of Ridiculously Fast Construction, it isn't too farfetched.

Comic Books

 * Garth Ennis once created a demon named Baytor in his Hitman series so he could eventually have him become Lord of Hell and be referred to as "Master" Baytor.
 * In one Dilbert strip, Dilbert and Dogbert are playing Scrabble, and Dogbert tries to pass off "neans" as a word in order to get rid of some excess "N"s, just to goad Dilbert into saying "The N's don't justify the neans".
 * A Bluntman and Chronic comic featured marijuana themed hero Bluntman getting distracted only to notice that Chronic has been tied up under a boulder held up by a crane. Derris, the villain, then delivers what amounts to "Give up or your sidekick gets stoned," and a couple police officers watching Lampshade this by saying "So that's why he went through the trouble of dragging that huge crane over there!" "Yeah! For that incredibly lame pun!"

Film

 * Kung Pow: The villain tells people to start calling him Betty at one point in the movie. It's funny on its own... then at the end of the movie
 * Rat Race has a gag where half the humor of it is how contrived the setup was: A series of increasingly implausible incidents result in a Jewish family crashing into a WWII veteran assembly in a car decorated with swastikas, and the father gets out sporting a black lipstick Hitler moustache and a tongue injury that makes him speak in German-sounding gibberish, and in trying to explain what happened starts sticking out his burnt middle finger and waving his hand in the air in a Zieg Heil-esque gesture.

Literature

 * Discworld:
 * In Soul Music, Nobby and Colon are watching Imp y Celyn busking in Ankh-Morpork and Colon comments that he's 'playing the harp'. Nobby says 'Lyre' and Colon says 'No it's true....Oh I bet you've been waiting all your life for someone to say 'that's a harp', just so you could make that joke. I bet you were born hoping that someone would say that'.
 * Actually, most of Soul Music is a build up to one of the final lines said in the book,
 * There's also Imp's name, which translated means bud of the holly, the y signifying 'of the.'
 * Jasper Fforde, Pungeon Master that he is, likes doing this.
 * Throughout Jasper Fforde's The Fourth Bear, the characters share office gossip about others in the police station. In the end, this comes together as a long "Peter Piper picked a peck of peppers" kind of tongue-twister, and they even break the fourth wall to complain about the gag: "I don't know how he gets away with it."
 * Fforde names a minor villain Yorick in his first Thursday Next book for no real reason other than that he can bring him back four books later to make a Hamlet pun.
 * "Death of a Foy" (can be found here, ctrl-F the word "foy"), by Isaac Asimov of all people. The careful and elaborate setup of an intricate setting and alien religious culture were all for the purpose of . For added effect, he even carefully tailored its length for the sci-fi publication he originally sent it to, so the reader had to turn the page right before the punchline hit out of nowhere. Lots of Asimov's short stories are like this. He could fill a book with them -- and did!
 * Also used in Everworld, with a character making an awful pun on "gymnosperm", then announcing he'd been stockpiling it since junior high.

Live Action Television
"Phoebe: Hey, Chandler, can I borrow your G-string?
 * On Scrubs:
 * JD and Turk did a lot of shift-switching to put two doctors named Turner and Hooch together on a medical case, just so they could shout, "Turner and Hooch!"
 * This can fizzle very easily: JD once told Doug that a patient had "updoc" in a class, hoping that he would would ask, "What's updoc?"
 * JD set it up so a patient thought his name was Daman, so that, when the patient asked who was doing his procedure, JD could answer 'Doctor Daman', prompting the patient to ask 'Who's Daman'. Needless to say, it failed, miserably. The patient was rather too polite, and added the honorific.
 * The Todd has been known to wait in hiding for hours until someone unwittingly sets up a double entendre.
 * JD also spent over a week setting up a joke about Oprah-themed cereal in My Happy Place, recording a member of staff's Oprah impression and rigging a cereal box (the design and manufacture of which he was presumably also responsible for) so that the recording played when it was opened.
 * Phoebe did this on Friends. Chandler was forced to leave a restaurant wearing only women's panties (long story...), so she says she'd like to write a song, but can't because her guitar is missing a string.

Chandler: How long have you been waiting to say that?

Phoebe: About 20 minutes."

"Colin: Our top story today: Rudolph the Red-Nosed Reindeer dead at 53. Over Barcelona today, the famed reindeer was hit by a flock of seagulls and a 747. Eyewitnesses report... that the reindeer in Spain was hit mainly by the plane."
 * Moving into their flat in Spaced, Tim is wearing a oversized green T-shirt and brown trousers, and Daisy a chunky orange sweater and red skirt, with thick-rimmed glasses on top of her head. No apparent reason, until they talk about which Scooby Doo character they are. Tim picks Fred and Daisy says Daphne. He slouches, and the glasses fall down on her face...making them look like Shaggy and Velma.
 * Whose Line Is It Anyway': Colin Mochrie is a master of this. While the show is largely improvised, Colin plays the anchorman role in Weird Newscasters often he enough that he's got many a overly prepared gag as his opening number. In addition to the one listed as the page quote:
 * One even halted the show for several seconds because everybody was laughing so hard (watch it here):

"Colin: Our top story today: Famous playboy Hugh Hefner managed to successfully stop an order of monks from operating a business on his property. The police forced the friars to close down their stall, which was outside the Playboy Mansion, where they had been selling flowers. Said one friar, "Well, if it was anyone else, we may have gotten away from it, but, unfortunately only Hugh can prevent florist friars.""
 * Another brilliant one here:

"Colin: Our top story today: Sixties musical group The Byrds today announced a twenty-four city reunion tour with their new band member George W. Bush. To save money Mr. Bush will play both guitars and drums. According to a spokesman, "A Bush in the band is worth two in The Byrds.""
 * And again...

"Colin: Our top story today: noted archaeologist Fred Flintstein made an amazing discovery today in Sweden. On a wind-swept fjord he came across some primitive musical instruments plus some minuscule deposits of fossilized stool. When asked what the stool could be, Flintstein replied "A dab'a ABBA doo.""
 * You get the pattern by now...

"Colin: I remember one time I went to the circus and I saw a strong man bend a car...bend a car? Pat Benatar!
 * In a game of "Greatest Hits", Ryan makes a joke about having a bug and being jittery as a lead into introducing a Jitterbug song. Colin pokes fun at him by doing the next two segues completely over the top:

Colin: When I was a jockey, and in my bed-well it was more of a cot- we had this sanitary paper for the fillies and...wait...bed cot filly paper? Red Hot Chili Peppers!"

"Servo: Say, how long have you been saving that sight gag, Mike?
 * Subverted in the infamous "Arctic Tern" moment, when Colin ruins Ryan's setup.
 * For which we are all grateful - not because Ryan's setup was ruined, but because the scene of Ryan absolutely losing it (along with Wayne having to bend over from laughter) was funnier than anything else they could have done.
 * In the MST3K episode The Girl in Gold Boots there's a shot of a pool table set up just right so that Mike can pull out a cue from under his seat and pretend to shoot some pool.

Mike: Oh, not long, about... eight years."

"Ian Hislop: That's a fantasically elaborate prop for that joke!"
 * In The Screaming Skull, Pearl, Brain Guy, and Bobo trick Mike and the bots into believing they've all previously agreed to meet dressed as penguins. They had to reserve the penguin costumes eight months in advance for $900 each.
 * In Track of the Moon Beast, some characters play a weird, confusing prank on an anthropologist, then spend the next several minutes explaining it. For a host segment, Crow tried to do the same to Mike, and it's even more awkward.
 * One episode of Lab Rats is spent getting the entire cast contrived juuuust right so that they look like a circus at the end of the episode (as the administrator insisted that their attempts would end up as one throughout the episode).
 * Another visual one was the Brian Blessed-hosted episode of Have I Got News for You, where he kept pulling props out from under the desk. One of these was a huge Spartan soldier's helmet which he put on between shots to provide Hypocritical Humor about continuity errors on television.


 * The Two Ronnies did these kinds of jokes leading up to news headlines, much like the Colin Mochrie example above (but predating it by decades).
 * How I Met Your Mother had Barney go through weeks of planning, months of experimenting, waiting 10 years, and spending $30,000 on fake medical bills, all to get Marshall to try to eat an exploding sub-sandwich.
 * QI. Most particularly, during a round wherein Stephen was discussing declining surnames and mentioned "Glascock" as one of them, Alan chimed in with the anecdote: "We had a Jimmy Glascock at school. You could always see when he was coming." After the laughter died down, he remarked, "I never thought I'd have a chance to do that joke."
 * Community featured the German foosball jocks who bought a soccer ball and walked in a row of three constantly carrying the ball with them, just waiting for the opportunity to kick a ball at Jeff foosball-style. Immediately lampshaded by Jeff.

Newspaper Comics
"Jason: I'm making a miniature RV out of these plastic building blocks. It's transporting a frozen waffle along with several expectant mothers obsessed with Rocky IV from the tip of South America to a country in southern Europe.
 * Pearls Before Swine often does this with Sunday strips; everything up to the last panel is building up an Incredibly Lame Pun or overly long string of rhyming/similar sounding words ("Please don't help my mama bomb a Osama Obama llama diorama"). The last panel is, invariably, Rat expressing his disgust and/or threatening violence against the writer.
 * A particularly elaborate/contrived one here.
 * FoxTrot had a Shout Out to Pearls Before Swine -- Peter immediately surmised that Jason had been reading too much Pearls.

Peter: Okay...

Jason: Here, grab it from me.

Peter: What for?

Jason: Just grab it. (Peter grabs it.) Leggo my Eggo-carrying Lego Winnebago full of preggo fans of Drago en route to Montenegro from Tierra del Fuego which is south of San Diego."

Radio
"[only after much scene-setting, Graeme and Barry get started on "The Poseidon Adventure"]
 * Taint of the Lex and Terry Radio Network once alleged that he had become a vegetarian some years before in hopes that a woman would one day offer to "eat [his] meat." Eventually, one did.
 * The elaborate puns on I'm Sorry I Haven't A Clue. The host's scripted ones are the best examples, but some of the ones the panellists come out with are really more notable for this, since they're being thought up on the spot (usually) and are more likely to be incredibly lame. In "Sound Charades," the audience often groans very early on as soon as it becomes clear what pun the players are relying on to convey their assigned title, and the rest of the round becomes an exercise in drawing out the setup for as long as possible.

Hamish: But look here, look here, ye're late today! Ye've missed The Teletubbies!

Dougal: Oh no!

Hamish: Aye!

Dougal: What hijinks were they up to today?

Hamish: Ohoho, I tell you, I was gripped.

Dougal: And me not here!

Hamish: Something terrible happened... to Po.

Dougal: Speak on, old friend!

Hamish: Aye, well, Tinky-winky, Dipsy, and La-la... couldn't see Po from the front!

Dougal: No. Divulge!

Hamish: Ye've no heard the worst of it.

Dougal: No?

Hamish: They couldnae see him from the back either!

Dougal: Mercy me!... [and so forth]"


 * In an episode of Just a Minute (the panel game where players have to talk about a subject without hesitation, repetition or deviation), Paul Merton took the given subject Off the Rails -- not unusual for him -- and started talking about the Welsh and Scottish parliaments. Clement Freud brought the house down by challenging him for "devolution." In a program remembering Freud after his death, Merton revealed that Freud had asked him before the show to work in the necessary reference, without telling him the joke.
 * The Goon Show, on multiple occasions, spent twenty minutes setting up to a pun that managed to be So Bad Its Good.

Stand-Up Comedy
"Last time I saw Dean was like five years earlier when Dean and I were doing a roofing job on top of a 40-story building. He started talking crazy that day and he goes, "I can't take it, man," and he got up on the ledge, and he jumped. Just after he jumped, I looked down and I noticed that Trampoline Emporium was having a sidewalk sale that day. Dean landed right on one of the trampolines, bounced back up 40 stories to where I was standing, and just as he floated up he said to me, "Y'know, I think a lot of your joke premises are contrived and hard to believe.""
 * Demetri Martin parodies this trope perhaps better than anyone else has ever managed to:

"Fuck me for building a moment..."
 * A heckler breaks up what he thinks is this during a Patton Oswalt special. Patton then explains how this works, and spends more time trouncing the heckler than the uninterrupted joke's setup would have been.

"Dara: "And then she gets to a major issue - Oh, lads, lads, lads, lads, lads... you'll know nothing about this, but I'm gonna say something here that you will never have heard of before in your life. But when I say it, watch out for this: When I say something in about a minutes time, every woman in this room is gonna make a noise. - Every one of you will make this noise, and I am not proud of the noise I am about to make you make. It's not a good noise I'm gonna make you do. There's good stuff just beyond that noise. That's gold! But there's a noise barrier, and you've got to make that noise to get through that barrier, right?. - During the process, there's a point where a descision may have to be made... - Icannotappologizeenough - ...
 * In one of his shows, Dara O Briain has a part about the midwife that he and his wife were seeing during his wives pregancy. When it comes to a joke about childbirth, he runs over two to boys in the front row he was talking to earlier and spends the next minute alternatingly explaining the importance of the thing he's going to say and apologizing to all the women in the audience in advance.

Audience: "Eewww...."

Dara: "There's the noise!""

Video Game

 * The vampiric comedy duo from Vampire Bloodlines go to incredible lengths  to set up what turns out to be a glorified "knock-knock" joke.  At least the recipient thought it was funny.
 * In Chrono Cross, Solt and Peppor serve as tutorial fights several times. Each time results in Peppor giving instructions on how to best hurt your party, and Solt failing at this in every way possible. This happens five times or so throughout the game. Upon finding the two in Home World, they perform a stage act..Both stand still, and Peppor hits Solt every couple seconds. They do this until you leave the room, and will keep doing it at random as part of the show. Much later in the game, a person in the audience delivers the punchline: "I thought they were a joke at first, but you start liking them after a while!"

Webcomics
"Swearing of oaths used to actually count for something. It used to be that people really respected sworn oaths, and would take you at your word, pretty much without question. Nowadays we're much too cynical a society to really put anywhere near as much credence on to an oath. I mean, if the director of a huge company swore on his mother's grave to stop polluting the rivers near his chemical factories, would anyone really believe him? It would be nice if we could revive faith in oaths, so that you really could believe someone if they swore to stop dumping toxic chemicals into the waterways. Lend such things more credence. It would be a credence clear-water revival."
 * Irregular Webcomic does this a lot. #590. #579. The author admits that yes, he named the character James Stud just to get that one joke. Also, this. In-universe and real world.
 * Occasionally David Morgan-Marr uses these in his annotations, for example:


 * This Xkcd comic, in a way. xkcd seems to like doing this a lot. Even in his crypto algorithms.
 * And again, except this time it's the actual joke, not an in-universe setup. Seriously, it's nine pages long. Or at least nine page-downs.
 * And another one.
 * Order of the Stick - here. As per usual, given a lampshade the size of Canada.
 * Eight Bit Theater - had this in conjunction with a Brick Joke: One of the first comics had Black Mage make an off-hand comment that a party of four White Mages would "never work" (He was reading a Nintendo Power magazine, which actually suggested a WMx4 party set-up in a sidebar article). Fast forward almost ten years in real time, and guess who defeats the Big Bad? Black Mage's reaction was extraordinarily subdued, but by that point, it's safe to assume he was far too used to being the Universe's Butt Monkey. The creator has admitted this as being the entire reason for making the comic in the first place!
 * Cyanide and Happiness: Cloning oneself to make a "beside myself" pun and turning oneself and one's car into a mermaid to make a mer-cedes pun are two fine examples.
 * Dinosaur Comics: "T-Rex! You just spent hours learning about accounting for a pun!"
 * Saturday Morning Breakfast Cereal has this. 10+ years of prep for a one-time one-word joke.
 * An earlier comic pulls the same thing, though the long-term revenge numbs a bit of the humor.
 * Kickback set up one in this strip of the Insecticomics.
 * Folly and Innovation has one with 65 days of patience for the sake of a pun.

Western Animation
"Bullock: Thank you for flying out here Smith.
 * American Dad had an in-universe example. CIA Director bullock sends himself and Stan on a 16 hour flight to Japan and meets him in full Kabuki dress in a Japanese tea house.

Stan: Of course Sir, but why are we dressed up like this?

Bullock: Because I thought we could be Secret Asians

Stan: A 16 hour flight for a bad pun? (Stan smiles, points at Bullock) Yes. Yes."


 * In the Young Justice Insecurity there's a scene where Cheshire pins Red Arrow down, holds a Japanese forked dagger to his neck, and steals a kiss, saying "A kiss is just a kiss". This appears to be entirely a setup for Wally to take the weapon and fire back with "And a sai is just a sai".

Web Original
"Upon discovering that Miles Black, the famous phrenologist from Yorkshire was going to take up yodeling to lonely goats in Bali, James White decided to balance four planks of wood on a beer keg and call it an abstract work of art in the style of a famous fourteenth-century architect, just going to prove that people will read any old garbage if they think there will be a good pun at the end of it."
 * Here's one that's lampshaded at the end.
 * Cracked - "7 Bizarre Noises From Outer Space": the editor listed six videos for noises. The seventh?
 * The creators of Red vs. Blue once joked that the series would eventually end with one final punchline that the entire show had been leading up to all these years and every Plot Hole would suddenly make sense.
 * On their Achievement Hunter site they spent twenty hours preparing an elaborate Minecraft city for the crew to live in... where the entire point was a single misaligned bock that would pour lava into one house. Twenty hours of work just to set one guy's house on fire when he tried to clean it up. It was later revealed they had a failsafe,.
 * One skit in a Loading Ready Run Rapidfire video took place over several cuts spread out over five minutes, featuring a morose clown waking up to face the day. All completely irrelevant, until the payoff in the final cut.
 * Subverted in the page quote for Just for Pun:

- The Grand Panjandrum's Special Award for Vile Puns, The 2008 Bulwer-Lytton Fiction Contest


 * 5SecondFilms provide us with a beautiful example with The Ballad of Truck Thunders.
 * This.

Real Life

 * Truth in Television: In If Chins Could Kill: Confessions of a B-Movie Actor, Bruce Campbell relates a true complicated prank he played on a friend involving his broken down car and the US Park Service.
 * At the beginning of the vice-presidential debate in the 2008 U.S. election, Sarah Palin and Joe Biden shook hands and she could clearly be heard saying, "Nice to meet you, can I call you Joe?" Many commentators later guessed that (given that candidates aren't really allowed to talk to each other during these "debates") she'd only asked so that she could begin one of her rebuttals with, "Say it ain't so, Joe!"
 * You just charged me for assault and battery!
 * The Rock Band Network is a system for small bands to get their own songs into the official Rock Band DLC store. The program that compiles the song for testing is called Magma "'cuz that's where rock comes from." The developers have stated that yes, that joke is the sole reason for the name.
 * While filming Torchwood Miracle Day, John Barrowman decided to "scare the crap out of Eve" by sneaking into her trailer and jumping out from the shower. He was in there a long time.
 * The self-described "Longest Joke In The World" (over 10,000 words, almost a novella) is essentially one giant, shaggy-dog style buildup to...a Spoonerism: "!"
 * The whole of Weird Al Yankovic "Since You've Been Gone song.