The series revolved initially around the life of the Harper brothers Charlie (Charlie Sheen) and Alan (Jon Cryer), and Alan's son Jake (Angus T. Jones). Charlie is a bachelor who writes commercial jingles for a living while leading a hedonistic lifestyle. When Alan's wife Judith (Marin Hinkle) decides to divorce him, he moves into Charlie's Malibu beach house (due to Charlie's selfishly scorning Alan's female divorce-lawyer) with Jake coming to stay over the weekends. Charlie's housekeeper is Berta (Conchata Ferrell), a sharp-tongued woman who initially resists the change to the household, but grudgingly accepts it. Charlie's one-night stand Rose (Melanie Lynskey) was first introduced as his stalker in the pilot episode.
The first five seasons find Charlie in casual sexual relationships with numerous women until the sixth season, when he becomes engaged to Chelsea (Jennifer Taylor), but the relationship does not last as Chelsea breaks off their engagement. Afterwards, Charlie flies to Paris in the eighth-season finale with his stalker Rose. In the ninth-season premiere, introducing a revamped show, it is revealed that Charlie died when he fell in front of a subway train in Paris. Suggestions are made that Rose pushed him in the train's path after learning Charlie had cheated on her.
Alan's experiences are somewhat different. Throughout the series, Alan continues to deal with his son Jake's growing up, and the aftermath of his divorce, when he has little success with women. His marriage to Kandi (April Bowlby) at the end of the third season was short-lived. In the fourth season, Alan is back at the beach house paying alimony to two women out of his meager earnings as a chiropractor. In the seventh season, he begins a relationship with Lyndsey McElroy (Courtney Thorne-Smith), the mother of one of Jake's friends. Their relationship is temporarily suspended when Alan cheats on her and accidentally burns down her house, but the relationship eventually resumes.
In the ninth-season premiere (after Charlie's death), the beach house is sold to Walden Schmidt (Ashton Kutcher), an Internet billionaire going through a divorce from Bridget (Judy Greer). Alan leaves to live with his mother Evelyn (Holland Taylor) when the house is sold, but Walden invites both Alan and Jake back to live in the beach house. He needs friends and the three form a tightknit surrogate family.
At the end of the ninth season, Jake joins the United States Army; he appears occasionally during season 10, briefly dating Tammy (Jaime Pressly), who is 17 years his senior and has three kids, as well as Tammy's daughter Ashley (Emily Osment). In the 10th season, Walden proposes to his English girlfriend Zoey (Sophie Winkleman), only to be turned down, and discovers she has another man. He becomes depressed. Meanwhile, Alan gets engaged to his girlfriend Lyndsey, while Judith leaves her second husband Herb Melnick (Ryan Stiles) (to whom she had been married since the fourth season) after he cheats on her with his receptionist (they later reconcile). Alan and Lyndsey's relationship of three years ends as she wants to move on. Rose returns and briefly dates Walden, later stalking him as she did to Charlie. Walden begins to date a poor but ambitious woman named Kate (Brooke D'Orsay) and changes his name to "Sam Wilson", pretending to be poor to find someone who wants him for him, not for his money. They later break up when he reveals who he really is, though Kate realizes that Walden's money helped her become a successful clothing designer. Jake announces he is being shipped to Japan for a year, so Alan and he go on a father-son bonding trip. Other than a cameo in the series finale, this is the last time Jake appears on the show, though verbal references are made to him.
In the 11th season, a young woman arrives at the beach house, announcing that she is Charlie Harper's biological daughter, Jenny (Amber Tamblyn). She moves in with Walden and Alan, later revealing many of Charlie's traits, including a love of women and alcohol. Lyndsey begins dating Larry (D. B. Sweeney) and in an attempt to learn more about Larry, Alan takes on the pseudonym "Jeff Strongman". His double-life becomes complicated when "Jeff" begins dating Larry's sister, Gretchen (Kimberly Williams-Paisley).
In the 12th season, Walden decides to reprioritize his life after a health scare by deciding to adopt a baby. He realizes that the only way to do this is to be married, but does not know anyone who will do it, so he asks Alan to marry him and pretend that they are a gay couple, thus ensuring success at adopting. Jenny moves out of the house and moves in with Evelyn due to Walden and Alan preparing to adopt. They adopt an African American child, Louis (Edan Alexander), and subsequently divorce to pursue relationships with women. Alan proposes to Lyndsey a second time, and she accepts, while Walden begins a relationship with Louis' social worker, Ms. McMartin (Maggie Lawson). Charlie is eventually revealed to be alive, having been kept prisoner by Rose until escaping, but he is killed before he can confront Walden and Alan.