Eddie (Ben Stiller), the owner of a San Francisco sports shop, is single but ambivalent about starting a relationship. While walking, he sees a thief snatching a woman's purse. Eddie tries but fails to retrieve the purse, he and Lila (Malin Åkerman) exchange pleasantries, begin dating, and soon become serious. Each imagines it's a perfect match. When a job offer requires Lila to live in Holland, Eddie learns that the company would not move a married employee, so with the urging of both his father, Doc (Jerry Stiller) and best friend, Mac (Rob Corddry), Eddie marries Lila.
During their honeymoon in Cabo San Lucas, it becomes increasingly apparent to Eddie how mismatched they are. On the drive there, Lila irritates him with incessant singing to a blasting radio. Lila's sex is so strenuous that Eddie suffers physical pain. She queefs really loud after sex. Eddie's disaffection deepens when Lila divulges her history of cocaine abuse, a deviated septum, and her habit of spitting drinks out through her nose. He learns that professionally she was only a volunteer, and that the purse snatcher had been one of her former lovers that she owed money. He calls his dad and tells him about the situation, but Doc misinterprets him.
At the Los Cabos resort ran by Uncle Tito (Carlos Mencia), Lila adamantly refuses to use sunblock while sunbathing only in baby oil, and then blames Eddie for the agony of her second-degree sunburn. As the enormity of Eddie's mistake sinks in, he meets Miranda (Michelle Monaghan), a vacationer with her family from Mississippi. Just as with Lila, Eddie immediately imagines that he and Miranda are a perfect match. With Lila confined to her room crippled by sunburn, Eddie devotes most of his honeymoon to Miranda. Eddie makes a favorable impression on all of her family except for her cousin, Martin (Danny McBride), who senses that Eddie is hiding something. Eddie confides in his problem about Lila and Miranda with Mac over the phone and Mac reveals that he is in an unhappy marriage himself.
There are mutual misunderstandings between Eddie and Miranda's family. The twin boys Eddie met at his ex's wedding tells Miranda's family that Eddie came to Mexico to mourn his wife who was killed by a maniac with an ice pick, a story Eddie told them meaning to be sarcastic; Eddie assumes Miranda knows about Lila and her abusive behavior. When Eddie decides to divorce Lila, he tries to bring it up at lunch, with Martin and his brother Buzz (Roy Jenkins) learning of his secret. When Miranda learns about Lila, she and Eddie fall into the ocean and Eddie is attacked by a jellyfish. (Lila treats the stings by urinating on him). After the chaos, Lila and Miranda both abandon him (Miranda for Eddie's deception and Lila for Eddie's wanting a divorce). Lila destroys Eddie's passport.
Eddie sinks into a depression and annoys a fellow Mexican named Manuel (Luis Accinelli) with his problems. Coerced by Uncle Tito, Eddie decides to go to Mississippi to make amends with Miranda. Border patrol agents repeatedly catch Eddie attempting to cross the U.S. border illegally with help from Tito. Eddie finally gets to Oxford, Mississippi. Upon meeting Miranda's family, he learns that she has married her previous boyfriend. Despite promising to leave Miranda alone, Eddie sneaks in and awakens Miranda as her husband sleeps. When her husband wakes up, Martin bursts in and attacks Eddie with a baseball bat until Doc intervenes. Eddie agrees to leave if Miranda says she truly loves her new husband, which she does. Eddie leaves with Doc, without knowing Miranda looks longingly from her balcony as he walks away.
Eighteen months later, having lost his sports store in his and Lila's divorce, Eddie moves permanently to Mexico. Miranda arrives and says she has left her husband and wants to be with Eddie. Eddie is thrilled, but hides that he has a new wife, Consuela (Eva Longoria), and is back in the same duplicitous predicament.
A post credit scene shows Lila having intercourse with a donkey.Ben Stiller as Edward "Eddie" Cantrow, a sports store owner and the main protagonist who marries too soon and goes through turmoil, causing him to go insane.Malin Åkerman as Lila Cantrow, Eddie's wife who at first is everything Eddie wants, but later turns out to be a total nightmare.Michelle Monaghan as Miranda, a woman in Mexico who Eddie believes is his true soulmate.Jerry Stiller as Doc Cantrow, Eddie's father who often visits Las Vegas and gives Eddie rather vulgar tips on woman.Rob Corddry as Mac, Eddie's best friend who is in a struggling marriage himself.Carlos Mencia as Uncle Tito, the owner of the hotel Eddie and Lila stay in on their honeymoon.Danny McBride as Martin, Miranda's cousin who is suspicious of Eddie.Roy Jenkins as Buzz, Martin's brother who treats Eddie more fairly.Ali Hillis as Jodi, Eddie's ex-girlfriend who gets married at the start of the film.Scott Wilson as Boo, Miranda's uncle and Martin and Buzz's dad.Amy Sloan as Deborah, Martin's wife.Kayla Kleevage as Doc's Vegas Companion, a huge-chested woman who is in the scene with Doc during his phone conversation with Eddie.Stephanie Courtney as Gayla, Buzz's wife.Polly Holliday as Beryll, Boo's wife, Miranda's aunt, and Martin and Buzz's mom,Eva Longoria as Consuelo Cantrow, Eddie's Mexican wife at the end of the film.Lauren Bowles as Tammy, Mac's wife who ends up in a dysfunctional marriage with him.Luis Accinelli as Manuel, an elderly Mexican who Eddie annoys after being stranded in Mexico.Jerry Sherman as Anderson, Miranda's granddad.
During the film's preview at the 2007 Comic Con Convention in San Diego, California, a sex scene from the film was cut due to backlash for the nudity in prior films at the convention such as 300 and Borat.
The film grossed $14,022,105 in 3,219 theaters in its opening weekend, putting it in second place at the box office in North America. The film eventually grossed a total of $127,766,650 worldwide, which includes $36,787,257 in North America and $90,979,393 in other territories.
Review aggregation website Rotten Tomatoes gives the film a score of 29% based on 156 reviews, with an average rating of 4.6/10. The website's critical consensus reads, "Despite some amiable performances, The Heartbreak Kid is neither as daring nor as funny as the Farrelly Brothers' earlier films". On Metacritic, the film had an average score of 46 out of 100, based on 30 reviews, which indicates "mixed or average reviews". Audiences polled by CinemaScore gave the film an average grade of "C" on an A+ to F scale.
Peter Travers (of Rolling Stone) declared the film the year's Worst Remake on his list of the Worst Movies of 2007. In a clip for the 2008 MTV Movie Awards, while arguing, Robert Downey Jr. takes a jab at Stiller about the weak reception for the film.