Far from the Madding Crowd is an examination of country life and love. Gabriel Oak, a successful shepherd, proposes to Bathsheba, who refuses him. Oak later loses his business and ends up working on Bathsheba's farm. Bathsheba has become the love interest of two more men, Boltwood, her repressed neighbor, and Troy, whom she marries. Troy later disappears and is thought dead, so Boltwood again pursues Bathsheba. When Troy returns, Boltwood kills him and is sentenced to prison. After years, Bathsheba realizes she does love Oak and marries him.
Gabriel Oak is a young shepherd. With the savings of a frugal life, and a loan, he has leased and stocked a sheep farm. He falls in love with a newcomer six years his junior, Bathsheba Everdene, a proud beauty who arrives to live with her aunt, Mrs. Hurst. Over time, Bathsheba and Gabriel grow to like each other well enough, and Bathsheba even saves his life once. However, when he makes her an unadorned offer of marriage, she refuses; she values her independence too much, and him too little. Feeling betrayed and embarrassed, Gabriel offers blunt protestations that only foster her haughtiness. After a few days, she moves to Weatherbury, a village some miles off.
When next they meet, their circumstances have changed drastically. An inexperienced new sheepdog drives Gabriel's flock over a cliff, ruining him. After selling off everything of value, he manages to settle all his debts but emerges penniless. He seeks employment at a hiring fair in the town of Casterbridge. When he finds none, he heads to another such fair in Shottsford, a town about ten miles from Weatherbury. On the way, he happens upon a dangerous fire on a farm and leads the bystanders in putting it out. When the veiled owner comes to thank him, he asks if she needs a shepherd. She uncovers her face and reveals herself to be none other than Bathsheba. She has recently inherited her uncle's estate and is now wealthy. Though somewhat uncomfortable, she employs him.
Meanwhile, Bathsheba has a new admirer: the lonely and repressed William Boldwood. Boldwood is a prosperous farmer of about 40, whose ardour Bathsheba unwittingly awakens when– her curiosity piqued because he has never bestowed on her the customary admiring glance – she playfully sends him a valentine sealed with red wax on which she has embossed the words, "Marry me". Boldwood, not realising the valentine was a jest, becomes obsessed with Bathsheba and soon proposesmarriage. Although she does not love him, she toys with the idea of accepting his offer; he is, after all, the most eligible bachelor in the district. However, she postpones giving him a definite answer. When Gabriel rebukes her for her thoughtlessness regarding Boldwood, she fires him.
When Bathsheba's sheep begin dying from bloat, she discovers to her chagrin that Gabriel is the only man who knows how to cure them. Her pride delays the inevitable, but finally she is forced to beg him for help. Afterwards, she offers him back his job and their friendship is restored.
At this point, the dashing Sergeant Francis "Frank" Troy returns to his native Weatherbury and by chance encounters Bathsheba one night. Her initial dislike turns to infatuation after he excites her with a private display of swordsmanship. Gabriel observes Bathsheba's interest in the young soldier and tries to discourage it, telling her she would be better off marrying Boldwood. Boldwood becomes aggressive towards Troy, and Bathsheba goes to Bath to prevent Troy returning to Weatherbury, as she fears Troy may be harmed on meeting Boldwood. On their return, Boldwood offers his rival a large bribe to give up Bathsheba. Troy pretends to consider the offer, then scornfully announces they are already married. Boldwood withdraws, humiliated, and vows revenge.
Bathsheba soon discovers that her new husband is an improvident gambler with little interest in farming. Worse, she begins to suspect he does not love her. In fact, Troy's heart belongs to her former servant, Fanny Robin. Before meeting Bathsheba, Troy had promised to marry Fanny; on the wedding day, however, the luckless girl went to the wrong church. She explained her mistake, but Troy, humiliated at being left at the altar, angrily called off the wedding. When they parted, unbeknownst to Troy, Fanny was pregnant with his child.
Some months later, Troy and Bathsheba encounter Fanny on the road, destitute, as she painfully makes her way toward the Casterbridge workhouse. Troy sends his wife onward with the horse and gig before she can recognise the girl, then gives Fanny all the money in his pocket, telling her he will give her more in a few days. Fanny uses up the last of her strength to reach her destination. A few hours later, she dies in childbirth, along with the baby. Mother and child are then placed in a coffin and sent home to Weatherbury for interment. Gabriel, who has long known of Troy's relationship with Fanny, tries to conceal the child's existence– but Bathsheba agrees that the coffin can be left in her house overnight, from her sense of duty towards a former servant of the household. Her new servant, Liddy, repeats the rumour that Fanny had a child; when all the servants are in bed, Bathsheba unscrews the lid and sees the two bodies inside.
Troy then comes home from Casterbridge, where he had gone to keep his appointment with Fanny. Seeing the reason for her failure to meet him, he gently kisses the corpse and tells the anguished Bathsheba, "This woman is more to me, dead as she is, than ever you were, or are, or can be". The next day he spends all his money on a marble tombstone with the inscription: "Erected by Francis Troy in beloved memory of Fanny Robin..." Then, loathing himself and unable to bear Bathsheba's company, he leaves. After a long walk he bathes in the sea, leaving his clothes on the beach. A strong current carries him away, but he is rescued by a rowing boat.
A year later, with Troy presumed drowned, Boldwood renews his suit. Burdened with guilt over the pain she has caused him, Bathsheba reluctantly consents to marry him in six years, long enough to have Troy declared dead.
Troy, however, is not dead. When he learns that Boldwood is again courting Bathsheba, he returns to Weatherbury on Christmas Eve to claim his wife. He goes to Boldwood's house, where a party is under way, and orders Bathsheba to come with him; when she shrinks back in surprise, he seizes her arm, and she screams. At this, Boldwood shoots Troy dead and tries unsuccessfully to turn the gun on himself. Although Boldwood is condemned to hang for murder, his friends petition the Home Secretary for mercy, citing insanity. This is granted, and Boldwood's sentence is changed to "confinement during Her Majesty's pleasure". Bathsheba, profoundly chastened by guilt and grief, buries her husband in the same grave as Fanny and the child, and adds a suitable inscription.
Throughout her tribulations, Bathsheba comes to rely increasingly on her oldest and, as she admits to herself, only real friend, Gabriel. When he gives notice that he is leaving her employ, she realises how important he has become to her well-being. That night, she goes alone to visit him in his cottage, to find out why he is deserting her. Pressed, he reluctantly reveals that it is because people have been injuring her good name by gossiping that he wants to marry her. She exclaims that it is "...too absurd– too soon – to think of, by far!" He bitterly agrees that it is absurd, but when she corrects him, saying that it is only "too soon", he is emboldened to ask once again for her hand in marriage. She accepts, and the two are quietly wed.