Series 5 of the sitcom begins with Ted (Josh Radnor) starting his new job as an architecture professor at Columbia University. Meanwhile, notorious commitment-phobes Barney (Neil Patrick Harris) and Robin (Cobie Smulders) begin dating, although neither of them know what they want out of a relationship; and Marshall (Jason Segel) and Lily (Alyson Hannigan) wonder if they should have a baby. Memorable guest stars include Jennifer Lopez and Carrie Underwood. Rachel Bilson has a small role as the roommate of Ted's future wife.
After sharing a kiss at the beginning of the summer, Robin and Barney are unsure how to handle their mutual attraction. After some consideration they tell the gang they have decided to remain just friends, but secretly continue seeing each other. They are able to get away with their secret romance for a couple months, but are discovered when Ted, Marshall and Lily walk in on them together. They explain to the gang that they are happy with their casual relationship, and didn’t want to complicate it by defining it. This is unacceptable to Lily, who pressures them to label their situation, and ultimately locks them in Robin’s room to force them to address it. Meanwhile, Ted is anxious about his first days as a professor at Columbia, which is made worse when he shows up at the wrong class and starts his lecture.
Barney takes Marshall, and Robin to a strip club where they find a stripper who looks almost exactly like Lily. Meanwhile, Ted discovers he had been fixed up with the same woman, Jen seven years earlier.
When Robin fears that Barney is cheating on her, she soon discovers that he is spending his evenings with Ted learning everything there is to know on how to date her.
Marshall and Lily want to hook up with Barney and Robin for double-dating and fun, but their desperate eagerness to please is a huge turn-off. Meanwhile, when a succession of girls come to his apartment and immediately fall asleep, Ted is bummed to learn he is a "Sexless Innkeeper" whose "dates" are only interested in a comfy place to crash
Barney tries his best hoping to convince Robin into becoming an American citizen, while Ted and Marshall's road trip takes an unexpected turn for the worst when Marshall invites Lily to come along.
Even though they do their best in order to be the perfect couple, Barney's attitude of know-it-all lands him in trouble with Robin and they are forced to seek Marshall and Lily for advice.
Lily comes up with a perfect plan to break up the relationship between Barney and Robin when they have a rough patch, but she needs help from Robin's famous friend, Alan Thicke, in order to make it work.
After his relationship with Robin ends, Barney dusts off his "playbook" to help him back into the dating scene
Barney freaks out when Marshall bequeaths a "slap bet" slap to Ted and Robin. Meanwhile, Lily's estranged father shows up for Thanksgiving.
When a perfect girl finally shows up, the gang tries everything to help Ted, while Marshall takes action when he discovers a letter written by younger himself.
When Marshall picks up smoking again, it prompts Lily, Ted and Barney, ex-smokers all, to succumb as well. Meanwhile, Robin gets a new co-anchor at her show...
When Barney debates giving up wearing suits in order to land a hot bartender, his conflicted feelings lead to an amazingly awesome musical number. Meanwhile, Ted gets one step closer to meeting the future mother of his kids.
When Lily refuses to believe that Jenkins, Marshall's attractive female colleague, kissed him, Marshall insists Jenkins tell Lily what really happened. Meanwhile, Robin finds out that a drinking game has been made up about her.
When Barney is about to complete the perfect week - landing seven different girls in seven days - the gang roots him on in order to forget about their own miserable week.
When Lily and Marshall forget to fix up Ted on a blind date for Valentine's Day, they use one of Barney's many discarded girls to see if they may become Ted's future wife.
Meanwhile, Robin's obnoxious colleague invites her to a party at his apartment.
When the gang tries to convince Ted that he is being strung along by Tiffany, they reflect about relationships where each of them has been in the same situation.
When Robin confesses that she is still angry with Barney for the way he handled their break-up, she enlists the help of Anita, a self-help author who plans to beat Barney at his own game.
When Ted ruins Lily's birthday dinner celebration by bringing a date, Lily goes to great lengths to keep her out of the traditional photo she takes every year of the gang.
When Marshall gets mugged, Lily decides she wants to get a gun for protection, so Marshall comes up with a convoluted story about the mugging to deter Lily from following through.
When Ted attends his mother's wedding, he is extremely disturbed by her overly affectionate relationship with her fiancé, which forces him to think about his own life and make an impulsive decision.
When Ted and Barney jeopardize Robin's new relationship by professing their love for her, Robin realizes that she is finally over them. Meanwhile, after spending a weekend sleeping in twin beds, Marshall and Lily decide to get twin beds at home.
When Ted, Marshall, Lily and Barney crash a highfalutin party at a swanky New York apartment, Ted gets the chance to mingle with the snooty guests and show off his intellectual side.
When Ted takes a date to see a new hit movie, "The Wedding Bride," he is shocked to learn the story is loosely based on his life, and that it was written by Tony, the man Stella left him for at the altar.