Things seem to be going great for Joy McNally (CAMERON DIAZ). Not only does she have a serious boyfriend in Mason (JASON SUDEIKIS) and is waiting for them to set a wedding date, she's also vying with coworker Chong (MICHELLE KRUSIEC) for a big promotion at a Wall Street firm run by their boss, Richard Banger (DENNIS FARINA). And then the unexpected happens when Mason suddenly dumps her. In response, she takes his birthday present of a Vegas trip and heads to Sin City with her best friend, bartender Tipper (LAKE BELL).
They're not the only ones headed there, however, as wood craftsman Jack Fuller (ASHTON KUTCHER) has finally been fired from his job by his boss who also happens to be his father, Jack Fuller Sr. (TREAT WILLIAMS). Along with wife, Judy (DEIRDRE O'CONNELL), he's upset that his young adult son can't commit himself to and/or complete anything. Now unemployed, Jack and his best friend, incompetent lawyer Hater (ROB CORDDRY), opt for a Vegas trip to get away from it all.
The four accidentally end up booked in the same hotel room, and after meeting that way, end up partying all night. The next morning, Joy wakes up in Jack's bed and learns to her horror that they got married the night before in a drunken stupor. They agree that was a mistake and quickly having a falling out, but then find themselves in an unusual situation when he puts the quarter she gave him into a slot machine that results in a $3 million payout.
Unable to agree on who should get the money, the two end up in court where the judge (DENNIS MILLER) decides their punishment should be having to live together as husband and wife for six months. Not only that, but they must also attend marriage counseling overseen by Dr. Twitchell (QUEEN LATIFAH).
The two aren't happy with the arrangement, but decide they can put up with anything for their half of the earnings. With encouragement from their friends, however, they separately decide to sabotage the other in terms of being a good and faithful spouse. From that point on, and using various tactics, the unlikely couple must contend with such ploys, all while trying to figure out how to live together.