The film's depiction of same-sex marriage in New York preceded the 2011 enactment of the Marriage Equality Act, which legalized marriage for same-sex couples in the state. At the time of the film's release, the state allowed for residents to file for unregistered cohabitation rights, and various municipal and county governments (including, as shown in-film, New York City) offered domestic partnership registries.
Chuck Levine, a womanizing bachelor, and Larry Valentine, a widower struggling to raise his two children, are two veteran New York City fire fighters. During a routine sweep of a burned building, a segment of floor collapses on Chuck. However, Larry quickly shields him from the falling debris, saving his life. Later, he and Chuck wake up in a hospital, where Chuck vows to repay Larry in any way possible. This incident serves as a catalyst for Larry's epiphany: death is both inevitable and unpredictable. This prompts him to significantly increase his life insurance policy, but he runs into difficulties naming his children as primary beneficiaries in his policy. He is told he should get remarried so his new spouse could be the primary beneficiary; however, it doesn't specify who he has to marry. Inspired by a newspaper article about domestic partnerships, Larry asks Chuck to enter a civil union with him. Although Chuck declines at first, he is reminded of his debt to Larry and finally agrees, entering a domestic partnership and becoming Larry's primary beneficiary in the event of his death. To their dismay, however, New York City investigators soon arrive to inquire about their abrupt partnership, under suspicion of fraud. Chuck and Larry decide to enlist the help of lawyer Alex McDonough, played by Jessica Biel, who suggests they get married and move in together to prove they're committed. Chuck reluctantly agrees. The pair soon travel to Canada for a quick marriage (so quick they use a nearby homeless person as the best man) and begin living together.
At a gay benefit costume party, the party goers are confronted by homophobic protesters, whose leader, a minister named Jim, calls Chuck a "faggot." Chuck punches him and the incident is picked up by the local news. With their apparent homosexuality and marriage revealed, the pair come under fire. Chuck and Larry are heckled and their fellow FDNY firefighters refuse to work or even play basketball alongside the couple. Their only ally is Fred G. Duncan, an angry, intimidating firefighter who comes out to a very surprised Chuck.
Larry's effeminate son, Eric is harassed in school by a homophobic bully but he surprises everybody by easily winning a fight with his abuser. During the ordeal, the previously homophobic pair come to understand what it is like to be persecuted and become more accepting of homosexuality.
Chuck becomes romantically interested in Alex after the two spend time together, but finds himself unable to get close to her because she thinks he is gay. Meanwhile, city agent Clinton Fitzer arrives to investigate the couple. The strain on both Larry and Chuck leads to a verbal fight and the two are assigned to work different shifts. In the meantime, a petition circulates to have Chuck and Larry thrown out of the firehouse. Discovery of the petition prompts Larry to confront the crew about their personal embarrassments on the job that Chuck and Larry helped them overcome. After the confrontation an emergency call comes into the fire station, and as they prepare to address the call, Larry reminds his coworkers that as a result of their harassment, he is no longer on duty. After Larry's shift is over, Chuck and Larry reconcile their differences.
Chuck and Alex's relationship grows as they spend time together, and they soon kiss. The kiss shocks Alex because she still believes Chuck is gay and married, making the interaction unacceptable from her point of view. Chuck tries to explain the situation and Alex kisses Chuck again but tells him they cannot see each other outside of their lawyer-client relationship. Alex says she believes in marriage and what it represents and that she has betrayed both him and Larry. Chuck attempts to explain but is unable to reveal the truth. Alex tells him to go, and he has no choice but to do so. Soon after, city agent Clinton Fitzer learns from Larry's children that Chuck has been spending time with Alex, whom he frequently talks about whenever Larry is not around. Fitzer appears shocked by this revelation.
Larry learns about the kiss and confronts Chuck about the amount of time he spends with Alex, asserting that Chuck's absence is causing issues in their ability to maintain the ruse of their relationship. Soon Chuck and Larry begin to argue. Chuck is infuriated that he must live a lie to fulfill his promise to Larry, especially because of the predicament it causes for his desired intimacy with Alex. Hurt, Larry asks why Chuck could not have fun with him. Chuck accuses Larry of changing since they married, accusing him of not acting like a husband, and that Chuck feels like he is unable to breathe. Larry tries to reason with Chuck, saying he feels that way only because he is afraid of feeling trapped by the marriage. Chuck aggressively reminds Larry their marriage is a sham and declares the marriage a nightmare. Larry disparages Chuck's ability to commit to anything and willingness to try to make the marriage work. Chuck then tells Larry to face the fact that they are not supposed to be together and that Larry needs to find a real relationship instead of being jealous about Chuck's relationship with Alex. In response, Larry reveals he is still in love with his deceased wife Paula, to which Chuck responds that it's time for Larry to move on for the sake of his kids. Despite the severity of the argument, Larry and Chuck soon reconcile their differences.
The marriage soon again comes under fire, as numerous women publicly provide testimonies of having slept with Chuck in the recent past, and the couple is called into court to defend their marriage on charges of fraud. They are defended by Alex, and their fellow firefighters arrive in support, having realized all Chuck and Larry have done for them over the years and how they treated Chuck and Larry in return. Fitzer interrogates both men, who testify that they genuinely love each other (albeit in a platonic fashion). As his final demand, Fitzer asks for the pair to kiss to prove that their relationship is physical. Before they do so, Chuck and Larry are interrupted by Fire Department New York Captain Phineas J. Tucker, who finally reveals that their marriage is a sham and that they are both straight. Tucker attempts to save Chuck and Larry by claiming he would have to be arrested as well, since he knew about the falsity but failed to report it. This prompts the other firefighters to each claim a role in the wedding in a show of solidarity. Chuck, Larry, and the other firefighters are subsequently sent to jail, but they are quickly released after negotiating a deal to provide photos for an AIDS research benefit calendar. The deal included pleading guilty to fraud, which would reduce the charges to a misdemeanor. In another words all charges being dropped and Chuck and Larry keep their benefits.
Two months later, Duncan and Alex's brother, Kevin, are married in Canada at the same chapel as Chuck and Larry. At the wedding party, Larry finally moves on from the death of his wife and talks to a new woman, while Alex tentatively agrees to a dance with Chuck and start a relationship. The film ends when Lance Bass sings, and little Eric tap-dances.
- Adam Sandler as Charles Todd "Chuck" Levine
- Kevin James as Lawrence Arthur "Larry" Valentine
- Jessica Biel as Alex McDonough
- Dan Aykroyd as Captain Phineas J. Tucker
- Ving Rhames as Fred G. Duncan
- Steve Buscemi as Clinton Fitzer
- Peter Dante as Tony Paroni
- Nicholas Turturro as Renaldo Pinera
- Rachel Dratch as Sara Powers
- Allen Covert as Steve
- Richard Chamberlain as Councilman Banks
- Nick Swardson as Kevin McDonough
- Lance Bass as Bandleader
- Cole Morgen as Eric Valentine
- Shelby Adamowsky as Tori Valentine
- Dave Matthews as Salesman
- Blake Clark as Crazy homeless man
- Dan Patrick as New York cop
- Chandra West as "Doctor Honey"
- Tila Tequila and Jamie Chung as Hooters girls
- Dennis Dugan as Cab driver
- Rob Corddry as Jim the minister
- Jonathan Loughran as David Nootzie
- Becky O'Donohue and Jessie O'Donohue as Donna and Darla
- David Spade (uncredited) as Transvestite groupie
- Rob Schneider (uncredited) as Asian minister
- Arne Starr (uncredited) as Court supporter
- Jim Ford (uncredited) as Criminal stuck in chimney