In 1985, awkward and shy 16-year-old high-schooler Ted Stroehmann (Ben Stiller) lands a prom date with his dream girl Mary Jensen (Cameron Diaz), only to have it cut short by a painful and embarrassing zipper accident. After the ordeal garners the attention of numerous members of the household and community, Ted is finally carted off to the hospital. He subsequently loses touch with Mary.
Thirteen years later, Ted is still in love maybe even obsessed with Mary. On the advice of his best friend Dom, he hires private detective Pat Healy to track her down. Healy finds that she is an orthopedic surgeon living in Miami with her friend, Magda, but Healy falls in love with the irresistible Mary as well. Healy resorts to lying, cheating, stalking, and drugging Magda's dog to win Mary but is exposed by Mary's architect friend, Tucker, who is heavily reliant on crutches and speaks with an English accent. Tucker, however, turns out to be a fraud himself, as he is an able-bodied and entirely American pizza delivery boy who is also in love with Mary. Using slander Tucker drives away potential rivals, among them Brett Favre (the football star, playing himself).
Ted, aided by Dom, drives down to Florida to reconnect with Mary. Ted seems to have won Mary's love, until an anonymous letter exposes his being less than honest about his link to Healy. While Ted confronts Healy and Tucker, Mary is confronted by Dom, who turns out to be her former boyfriend Woogie, who "got weird on her" back in high school, setting up the original prom scenario. Having found out that Tucker also lied about Mary's former love interest, football player Brett Favre, Ted decides that Mary should be with Brett (who was the only one of the suitors who did not resort to deceit to win Mary). After reuniting Brett and Mary, Ted leaves tearfully. But Mary chases after Ted, saying that she would be happiest with him.
The film concludes with the two engaging in a kiss while a guitarist (Jonathan Richman), who periodically narrated the story in song as a Greek chorus throughout the film, is accidentally shot by Magda's boyfriend who was trying to shoot Ted so he could win over Mary.