In the season opening, Ted sees Cindy again with a girl who he thinks to be her roommate, but she turns out to be Cindy's girlfriend whom she later marries. After prodding by Barney, Ted is eventually hired by GNB once more as the architect of the bank's new headquarters (which was originally scrapped in Season 4). However, he encounters opposition when he meets Zoey Pierson (Jennifer Morrison), a woman who is protesting against GNB for selecting a decrepit hotel, the Arcadian, to be torn down for the headquarters. Over the season, Ted's encounters with Zoey eventually blossom into a relationship after she divorces her rich husband, but they break up as he puts his career over love, leading to the Arcadian's demolition. Ted also resolves not to get back with Zoey.
Having agreed to conceive a baby at the end of the previous season, Lily and Marshall keep having sex, hoping she will get pregnant. Around Christmas, they have a false alarm and later seek fertility testing and find the fifth doppelganger (Barney's doppelganger) as their fertility doctor, Dr. Stangel. However, tragedy strikes when Marshall's father passes away, leaving him devastated and the gang comforting him. Marshall tries to get over his father's death and live again. Despite a pledge to Lily to work harder for their future, Marshall resigns from GNB and follows his dream of being an environmental lawyer. Zoey also hires him as her lawyer in what became a futile battle to save the Arcadian. At the end of the season, Lily reveals that she is pregnant.
Barney finally admits to the gang that Bob Barker is not his real father, especially when his mother decides to sell the house he grew up in and his brother, James, meets his own father. Loretta offers the identity of Barney's father on a sheet of paper, but Barney tears this up after realizing her efforts as a single mother. At the funeral of Marshall's father, Barney tells Loretta that he wants to see his father at last. The man, Jerome Whittaker, is eventually revealed to be someone whom Barney thought was his guardian. Barney is disappointed because Jerome was not the free-wheeling man he knew as a child. Although he tries to bring back Jerry's old ways, Barney admits that he wants to settle down someday. He is also introduced to Nora, a co-worker of Robin, for whom he develops feelings. After an initial falling out, the season finale indicates a possible future revival of their relationship, where Barney asks her for coffee and Nora tells Barney that "it's never too late" to wear a sun-dress.
Robin continues to work at her talk show, Come On, Get Up, New York!, but the presence of a new hyperactive co-host forces her to leave. She is accepted as a researcher in another network, World Wide News. The gang also discovers more of her past as the Canadian pop star Robin Sparkles. Robin also encounters a man (Michael Trucco) she has had a secret crush on since first seeing him when she and Ted were dating, and Future Ted hints that there will be more of him later.
A short scene during both the first and last episode of the season feature a wedding set sometime in the future, which is where Ted will meet his future wife. In the last episode it is revealed to be Barney's wedding.
Season seven opens to find Barney getting ready for his wedding with a yet unknown bride. Barney and Ted reminisce about Punchy's wedding, and Lily and Marshall reveal that they are having a child together. Marshall gets a job at the environmental law firm, Honeywell & Cootes. Barney proves to Nora that he can be a good boyfriend to her, and Robin regains feelings for Barney. Barney is forced to wear Marshall's ducky tie for a whole year after losing a bet with Lily that he can do a chef's job at Shinjitsu. Ted meanwhile runs into Victoria again, and feels guilty for almost cheating on her with Robin six years ago. However it emerges that Victoria cheated on him herself in Germany, and that she is about to get engaged to the guy she met there. After a fight, the two share a kiss but Victoria decides to remain with her boyfriend. Upon leaving, inspired by the fact she just kissed Ted because of sentiment towards him, she warns Ted that Robin will similarly eclipse any successive relationship he and Barney try to have.
Robin takes court-mandated therapy (for assaulting a woman), until her therapist Kevin (Kal Penn) lies to her, telling her that he is moving to Alaska. However, shortly after Robin runs into him at a restaurant. He confesses that he lied to her because he finds her attractive and therefore cannot be her therapist anymore. They start to date, after some initial awkwardness. Marshall and Lily learn that their baby will be a boy. Ted finally meets "The Slutty Pumpkin" portrayed by Katie Holmes, however they have the worst romance ever and break up soon after. Robin finds out from Barney's father that he is one-quarter Canadian, Barney is shocked by this fact, and tries to prove that he is a true American by wearing Rocky's Americana boxing trunks for Halloween. Barney quickly tires of wearing the ducky tie, but becomes desperate to take it off when he is due to meet Nora's parents for the first time. In the end, a compromise is reached... Barney can take off the tie if he has three slaps added to the one slap he has remaining from the slap bet. Barney agrees, and Marshall delivers two of the slaps immediately, leaving him with two remaining.
It is revealed that Marshall and Lily conceived their child in Barney's bathroom during Hurricane Irene and also that Robin and Barney almost kissed a day after that but were interrupted by a call from Robin's father. While reminiscing about this, they end up kissing in a cab and sleeping together. Barney and Robin both realize what they've done and decide to tell Nora and Kevin. Things take an unexpected turn, however, since Barney ends up breaking up with Nora for Robin. Robin decides to stay with Kevin. Marshall and Lily decide they want to move to Long Island.
Robin's period is late, making her believe she is pregnant and (as she had not yet slept with Kevin) Barney is the father. Both Barney and Robin are worried at this news, as neither of them want children at the present time. Going to the doctor, Robin learns that she is not pregnant. However her happiness is cut short when she learns that she cannot have children, which leaves her devastated.
The rest of the season is scheduled to continue in January 2012.