The novel is set in Avalon Bay, a fictional coastal town in South Carolina where affluent students from the nearby Garnet College clash with working-class locals.
Cooper Hartley and his twin brother Evan grew up in the Bay, raised largely by their uncle Levi after their mother, Shelley, repeatedly abandoned them. Cooper resents the wealthy college students, whom the locals call "clones." One night at Joe's Beachfront Bar, a Garnet senior named Preston Kincaid gropes Cooper's coworker Steph. Cooper punches him, and Preston retaliates by leveraging his father's financial power to get Cooper fired.
Mackenzie "Mac" Cabot, a twenty-year-old from a wealthy Charleston family, arrives at Garnet reluctantly. She took a gap year to build BoyfriendFails and its companion site GirlfriendFails, successful websites that generate seven-figure revenue, but her parents dismiss the business as a hobby. Her father, a US Congressman, and her mother, Annabeth Cabot, pushed Mac to attend Garnet as part of a broader plan: graduate, marry her boyfriend Preston Kincaid, and follow in her mother's footsteps. Mac has been dating Preston for four years since their prep school days.
At a locals-only bonfire, Cooper and his friends discover that Preston has a girlfriend. Evan proposes a revenge scheme: Cooper will seduce Mac, get her to dump Preston, then publicly humiliate both of them. Their friend Steph sets ground rules, including that Cooper cannot lie outright and cannot sleep with Mac unless she initiates. Their friend Heidi objects to the plan as cruel, but Cooper agrees to it.
Mac and her roommate, Bonnie May Beauchamp, go bar-hopping. At the Rip Tide, Cooper approaches Mac and bets she will leave with him within the hour. Mac mentions her boyfriend repeatedly but is drawn to Cooper's bluntness. He accuses her of having a "good girl complex," calling out the boredom she tries to hide. Cooper invites both girls to a bonfire on the beach, pairing Bonnie with Evan. He and Mac stay up talking until dawn, and she gives him her phone number.
Over the following weeks, they text daily with growing flirtation. Mac finds her classes pointless, and Preston dismisses her websites as her "little tech thing." Cooper, by contrast, sees Mac's restlessness clearly. Their bond deepens when Mac spots a stranded puppy on a jetty and swims out to rescue it, with Cooper following. They bring the dog back to Cooper's house, where he admits he wants to kiss her but pulls back. The twins keep the puppy, and Mac claims partial custody, eventually winning the naming battle: Daisy.
Mac learns from the girlfriends of Preston's friends that men in their circle maintain "wifeys" and "Marilyns," wives and mistresses, treating infidelity as a tolerated norm. When Preston describes Mac as "wife material," her unease deepens. At the annual boardwalk festival, Cooper takes Mac on a bungee slingshot ride and calls in the "marker" from their original bet: She must kiss him or admit she does not want him. Mac kisses him as they launch into the sky. Back at his house, she initiates a more intense encounter against the front door, interrupted when Heidi walks in. Mac flees, shaken.
Mac confesses to Preston that she kissed "some local." He forgives her with unsettling ease, calling it a "minor indiscretion." Mac texts Cooper that she cannot see him anymore. Weeks pass before Mac is drawn back to the abandoned Beacon Hotel, a late-Victorian building gutted by hurricane damage, where she meets the elderly owner, Lydia Tanner, and impulsively negotiates to buy the property.
When Mac shows Preston the hotel, he reacts with fury, revealing he has always envisioned her as a stay-at-home wife while he runs his family's bank. Mac calls Cooper to see the property instead; he recognizes its potential and encourages her. Their proximity reignites their chemistry, and they kiss again. Cooper blurts out that Preston is cheating on her. Mac slaps him and storms off, but the accusation torments her for about twenty-four hours, entwining with her existing doubts.
At a family dinner, Preston announces plans for Mac to move to Atlanta with him after graduation, all without consulting her. Her parents direct the conversation at Preston as if Mac is not present. She walks out, confronts Preston, and breaks up with him. When she accuses him of cheating and he cannot look her in the eye to deny it, she takes his silence as confirmation. Mac goes straight to Cooper's house, and they sleep together for the first time. Cooper then tells his friends the revenge plan is over. Heidi agrees reluctantly, but Cooper catches a vindictive gleam in her expression and warns her never to reveal the truth.
Over the following months, the relationship deepens. Mac bonds with Steph and Alana, two of Cooper's close friends, after climbing onto their roof during a thunderstorm to patch storm damage. She forms a genuine friendship with Evan after rescuing him from frat boys who beat him up. She drops out of Garnet, writes her father a check covering her tuition when he threatens to cut her off, and moves in with Cooper.
Preston confronts them on the beach, recognizing Cooper as the bartender he got fired and insisting Cooper pursued Mac for revenge. Cooper denies it, and his friends back his story, though the close call rattles him deeply.
Cooper's estranged mother, Shelley, arrives unannounced. After two days of charm, she leaves, and Cooper discovers she has stolen twelve thousand dollars, his entire emergency savings. He and Mac fight bitterly: She offers to replace the money, and he accuses her of throwing cash at every problem. Levi helps Cooper press charges. Police in Louisiana apprehend Shelley with most of the cash. Cooper recovers the money but drops the charges, unable to send his mother to jail. He tells Shelley she no longer has sons, and Evan stands with him.
Cooper and Mac reconcile, exchanging declarations of love. Mac reveals she created BoyfriendFails; Cooper is impressed rather than threatened. Levi restructures his company as Hartley & Sons, making the twins equal partners.
At their joint birthday party, Mac overhears Heidi telling others about the original revenge plot. Alana confirms the truth when Mac confronts her directly. Mac throws a beer in Cooper's face. Cooper admits the plan started as revenge but insists he fell in love for real. Mac tells him she might have forgiven everything if he had not lied to her face when she asked about Preston. She packs her things, takes Daisy, and leaves.
Mac moves in with Steph and Alana, throwing herself into her hotel renovation. Cooper sends gifts daily, all returned. He and Heidi have an honest conversation about how he treated her after their past hookups, and they reconcile as friends. Weeks pass with Mac refusing contact. Finally, Cooper publishes a confessional post on BoyfriendFails titled "I'm the #BoyfriendFail," publicly admitting his scheme and begging for a second chance. Mac is moved to tears. Cooper waits on the beach where they rescued Daisy. Mac arrives, and he leads her to the veranda of her hotel, where he has placed two rocking chairs and lined the railing with candles, recreating a vision she once described of guests watching the waves. He tells her he pictures growing old beside her and vows never to lie again. Mac forgives him, and she agrees to come home.