Casting Gag: Casting Neil Patrick Harris & Wayne Brady as Barney & James Stinson, with the actors playing characters of the opposite sexual orientation.
Creator's Favorite: Lily, it's very rare to see her suffer any sort of comeuppance for her actions & the show has a habit of finding a way to make sure she always gets what she wants in the end. On top of that, she's based on co-creator Craig Thomas's wife.
The gang frequently plays their younger selves in flashback sequences, even to when they're teenagers.
In a meta-example James Van Der Beek played his character as a teenager. Possibly the only example where Dawson himself participated in Dawson Casting outside of Dawson's Creek. James Van Der Beek guest starred as Robin's old boyfriend and played both his teenage self and his middle-aged self.
Inverted with Robin who is actually a couple of years older than Cobie Smulders is in real life (presumably to shift her being a news anchor out of Improbable Age territory).
Lampshaded in one episode, when Barney claims Robin always says she's two years younger than what she really is.
Defictionalization: Full versions of the music videos for both Let's Go to the Mall and Sandcastles in the Sand have been created and both songs are up for purchase on itunes. The Bro Code and The Playbook were also made into actual books. Also, an in-universe example when Robin describes the building Ted designed as "a building in your head that became real."
People associated with Robin are all played by non-Canadian actors/actresses.
Jessica Glitter, Robin's co-star from her Canadian children's television show (although it's never stated directly that she's a Canadian citizen), is played by Nicole Sherzinger, an American who was born in Hawaii and raised in Kentucky.
Katie and Genevieve, Robin's sister and mother, are respectively played by American Lucy Hale and British Tracy Ullman.
A popular theory online was that Ted would marry Barney's half-sister. In "Ring Up," Barney unknowingly encourages Ted to sleep with her and Ted unknowingly does, leading to Barney freaking out at the revelation, and then trying to get them to marry to justify it. They don't get married, but they do have fun teasing Barney....
Goes a step further. The actresses who were contacted to audition for the role of The Mother were actually screentested under the guise of a casting call for an actress to play Barney's half-sister.
"How Your Mother Met Me" is the timeline of the series from the perspective of The Mother, filled with little winks to fan theories. One in particular was the St. Patrick's Day party from "No Tomorrow" being revisited with the Mother's friend Kelly saying she could bump into the love of her life, with a cut to the shot in the original episode of Ted bumping into a random girl, the "bump girl" was a popular theory that she was supposed to be the Mother.
Fan Nickname: Luke & Leia for Ted's kids, based off Ted being told to swear on his future children & responding "I swear on Luke & Leia."
Ascended Fanon: Season 9's "Unpause" reveals that Ted's son is called Luke, but his daughter is named Penny.
In the light of the final episode, there are many nicknames for the series such as "How I Met Your Step Mother", "How I Asked Your Permission To Bang Your Aunt Robin", "How I Met My Children's Surrogate Mother" and so forth.
The Mother is often dubbed as The (or simply) Uterus due to the above.
Gratuitous Foreign Language: In "The Best Man" comments on Shmosby videos are actually intelligible Finnish, but obviously created with a translation software.
Neil Patrick Harris' co-stars from the HaroldandKumar movies, Kal Penn & John Cho turn up over the course of the series.
David Burtka, who plays Scooter, is Neil Patrick Harris' partner in real life.
Alyson Hannigan's husband, Alexis Denisof, plays Sandy Rivers, and their Buffy the Vampire Slayer co-stars Seth Green & Tom Lenk also appeared. Danny Strong guested as the minister at Marvin Eriksen's funeral.
Jason Segel's Freaks and Geeks co-stars Samm Levine, Martin Starr & Busy Phillips appeared over the course of the series.
Cobie Smulder's husband, Tarran Killam, appears as Gary Blauman.
Irony as She Is Cast: Neil Patrick Harris didn't officially come out as gay until a few years into the show (it was sort of an open secret beforehand). This made Barney's aggressive heterosexuality and his issues with his gay brother James even funnier. There is a whole ordeal with Barney opposing James' marriage, not because it would be a gay marriage but he was opposed to marriage in general.
Old Shame: An in-character example for Robin, as "Canadian Teen Popstar" Robin Sparkles, and her hit songs "Let's Go To The Mall" and "Sandcastles In The Sand", as well as staring in a Canadian edutainment show. She's so humiliated by this that she would admit to being married & doing porn before admitting to being Robin Sparkles.
Inverted with Marshall. When Ted points out that in college, Marshall wore a beanie, grew a soul patch & requested everyone refer to him by some ridiculous alias. Marshall immediately retorts that he doesn't regret that for one second.
Barney's video to Shannon begging her to come back to him (and serenading her) when he was still a hippie.
Future Ted is often embarrassed by Modern Ted's role in some of the stories. Similarly, Modern Ted is embarrassed about College Ted.
One episode even revolves around one of the old shames of each character (such as Ted's rereturn).
Britney Spears also campaigned to be in this show.
Real Life Writes the Plot: Josh Radnor is very allergic to dogs, and didn't tell the show's creators this until after he'd been hired. They worked around it for awhile with, according to a blog post Radnor wrote, "some Claritin and some thorough vacuuming." However, while filming the episode "Stuff" (in which Robin's five dogs are a major plot point), the scene in which Ted is kneeling down by the Dalmatian and petting its face caused Radnor to have such a severe allergic reaction that paramedics were called. Eventually Robin sent her dogs to live somewhere other than a cramped New York apartment as part of the story, never to be seen again (though you can still see an affinity for dogs in decorations around her house, or occasionally on T shirts she wears)
It is never stated in the show, but the creators have confirmed that Carl's last name is MacLaren and that he owns the bar. This is a Shout-Out in and of itself - Carl MacLaren is a member of the HIMYM crew.
If the show wasn't picked up beyond the initial thirteen episode order, Victoria would have been The Mother.
Word of St. Paul: Prior to the series finale airing, Cristin Milioti was asked about the fan theories that the Mother has been dead the entire time Ted has been telling the story, and her response of "That's insane." was taken as a debunking of the theory. It did, however, turn out to be entirely accurate - Milioti was more than likely commenting "That's insane, they've already figured out the ending."
If the show hadn't gotten picked up for a second season, Victoria would have been the mother.
Season 8 was intended to be the final season, but when the show was unexpectedly renewed for a ninth season the planned ending (Robin and Barney get married and Ted meets the mother) had to be pushed back.
Within two weeks of the episode airing, Carter Bays and Craig Thomas still hadn't decided on the ending of the series, trying to choose between two endings. The alternate ending is supposed to be on the DVD release.