This is the famous opening scene of the novel: Michael Henchard (who hasn't been named yet at this point) gets drunk at a county fair and auctions off his wife and baby daughter for five guineas. His wife, Susan, thinks the sale is legal and binding and leaves with the sailor who bought her. Henchard wakes up sober and sorry the next morning but can't find his family. He swears a solemn oath not to touch alcohol again for twenty years. Time passes, and he becomes a wealthy grain and hay merchant in the town of Casterbridge.
Susan's sailor husband Newson dies (she thinks), so she and her daughter try to find Henchard again. They're surprised to find that he's now wealthy and powerful. Henchard, meanwhile, has accidentally ruined the reputation of a young lady from Jersey. They spent a lot of alone time together while he was sick, so everyone is gossiping about her. Henchard is about to marry her when Susan shows up. He has to tell her that his first wife has reappeared so he can't marry her.
Henchard hires Donald Farfrae, a young Scottish man, to manage his business. For a while they're the best of friends, and Henchard's stepdaughter, Elizabeth-Jane, develops a crush on Farfrae. Farfrae is very practical and has a great head for business. In fact, he's so good at his job that Henchard quickly becomes jealous of him. He rashly fires Farfrae and forbids him from seeing or speaking to Elizabeth-Jane again. Farfrae sets up his own business across town.
Henchard is single again and free to rescue Lucetta's reputation by marrying her. The trouble is that she no longer really wants to marry him. She has inherited a lot of money, changed her name, and moved to Casterbridge, hoping to leave her bad reputation behind her in Jersey.
Henchard finds out that Elizabeth-Jane isn't his real daughter; she's the daughter of Newson, the sailor. He sends Elizabeth-Jane away and she goes to live with Lucetta. Lucetta meets Farfrae and falls in love with him. Henchard's jealousy goes through the roof and he tries to blackmail Lucetta into marrying him. Elizabeth-Jane witnesses Lucetta promise to marry Henchard. Henchard is forced to declare bankruptcy, and Farfrae buys his old business.
Farfrae and Lucetta marry, but Lucetta lives in constant fear that Farfrae will find out about her past with Henchard. Henchard makes up with Elizabeth-Jane, and they live together as father and daughter again. He would be happy, but he's afraid Elizabeth-Jane will find out that he's not her real father.
Then Newson, the sailor, shows up. Henchard lies and says that Elizabeth-Jane is dead. Newson leaves, but now Henchard has one more thing to worry about – what if Newson comes back and Elizabeth-Jane finds out he lied?
The secret of Lucetta and Henchard's past relationship leaks out, and the townspeople hold a drunken procession to expose it to the world. Lucetta falls into hysterics. She's so afraid Farfrae will stop loving her that she ends up dying. Henchard is already bankrupt, so he really has nothing to lose. The procession doesn't bother him, although he's sorry Lucetta dies.
Now that Farfrae is free to marry again, he realizes that a better woman has been there all along. He and Elizabeth-Jane pair off. Henchard is still afraid that Newson will come back and tell Elizabeth-Jane the truth, and he can't bear the thought of her rejecting him. When he finds out that she's planning to marry Farfrae, he accepts it and says he's going to leave town. He wanders the countryside in the rain for a few weeks and eventually dies half an hour before Elizabeth-Jane and Farfrae find him.