Will Hayes (Ryan Reynolds) is a 38-year-old father who is in the midst of a divorce. His 10-year-old daughter Maya (Abigail Breslin) lives with her mother but is with him twice a week. On one of these occasions she questions him about his life before marriage. After her first sex-ed class, Maya first asks and then insists on hearing the story of how her parents met and decided to get married. Will gives in, but decides to change the names and some facts, thereby creating a love mystery, with Maya guessing which of the women will be her mom. The story he tells Maya is depicted in long flashbacks. From time to time the film switches back to the present, where Maya comments and asks questions.
The story begins in 1992, where Will, a starry-eyed aspiring politician, moves away from Wisconsin and his college sweetheart, Emily (Elizabeth Banks) to New York to work on the Clinton campaign. She gives him a closed packet and asks him to give it to her friend Summer Hartley (Rachel Weisz), an aspiring journalist. In New York, he meets April (Isla Fisher), the copy girl for the campaign. Before bringing the packet to Summer, Will opens it- it is Summer's diary. Encouraged by his roommate Russell (Derek Luke), he reads it, and comes across pages describing a love affair between Emily and Summer. He visits Summer to bring the diary, and meets her roommate and sometimes-lover, her college professor, a famous writer named Hampton Roth (Kevin Kline). When Will leaves Summer kisses him, leaving Will shocked and confused.
Will and April have a chance meeting outside work, where Will reveals he is going to propose to Emily. When Will practices a proposal to Emily on April, she is taken aback by Will's words, and replies, "Definitely, maybe." They go back to her apartment, where April has multiple copies of Jane Eyre in her collection, explaining that her father gave her a copy with an inscription in the front shortly before he died, and the book was later lost. She has spent years buying copies of Jane Eyre from secondhand stores, hoping to find the copy her father gave her. April talks about her dreams to travel around the world, which she finds herself unable to do because of her current relationship with someone she rarely sees. When Will suggests she break up with her boyfriend to fulfill her desires, the two eventually share a kiss, with Will leaving quickly and berating himself.
Emily visits New York, and Will proposes in Central Park (first by recounting the story of his parents' engagement, and then by going through the words he said to April), but Emily turns him down and confesses she slept with Will's former roommate in Wisconsin, Charlie. Will is heartbroken. Time goes by, Bill Clinton becomes president of the United States, and Will and Russell start their own consulting firm. Their biggest client is Arthur Robredo (Nestor Serrano), their former employer on the Clinton campaign who is running to be Governor of New York. April travels the world like she wanted, and she and Will become pen-pals. Eventually, with the encouragement of Roth, Will and Summer become romantically involved. In the meantime April returns from her travels as she realized that the man she truly loves is Will. However she meets him as he's buying the engagement ring for Summer. April is heartbroken, but at the time Will doesn't notice it. Will and Summer's relationship ends when Summer writes an unfavorable story about Robredo, leading to Robredo's defeat and damaging Will's career and friendship with Russell.
Will becomes disillusioned about his choice of profession when Bill Clinton is implicated in the Monica Lewinsky scandal. He hates his job, and starts to drink heavily after finding out that April is dating a new guy. In a drunken rant, he confesses romantic feelings to her, but in the process, ends up having a fight with her, telling her to "go to life-rehab". However, it may be because of these words that April returns to school.
Some time after the fight, while walking the streets of New York, Will finds the copy of Jane Eyre that April's father gave her. He goes to give it to her, but decides against it when he meets her boyfriend Kevin, with whom she is living.
Summer and Will bump into each other while he is at a cafe, and Summer, who is now pregnant, invites him to a party. Maya gets upset about the possibility of Summer being her mother and Will not being her natural father. However, it is revealed that Emily also attends the party, as she now lives in New York. Eventually, she and Will start up another relationship, and Emily turns out to be Maya's mother and Will's ex-wife, as Maya correctly guesses. Will explains to Maya that the happy ending all along was Maya and they share a hug and part separate ways.
At home Will signs the divorce papers served to him and unpacks his things moved from the previous house. By accident he sees the book he wanted to give April years ago and decides to visit her at her workplace, Amnesty International. After learning that she is now single again, he gives her the book, but when she finds out that he was holding on to it rather than giving it to her immediately, she becomes angry and asks him to leave her office.
Maya is happy that she figured out the story, but also realizes that her father still loves April, as even though Will changed the names of Emily (Sarah in real life), and Summer (Natasha in real life), he did not change April's name. Encouraged by Maya, who wants her father to be happy, Maya and Will go to April's apartment. Though April refuses to open the door at first, she hears Maya demand that Will tell April the story exactly as he told it to her. April still doesn't emerge, but as they turn to go back home, she comes outside. Will confesses to April that he held on to the copy of Jane Eyre because it was the only thing he had left of her. As the three enter into April's building, April jumps into Will's arms and kisses him.