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 eight years his junior, Bathsheba Everdene, a proud beauty who arrives to live with her aunt, Mrs. Hurst. She comes to like him well enough and even saves his life once, but when he makes her an unadorned offer of marriage, she refuses; she values her independence too much and him too little. Gabriel's blunt protestations serve only to drive her to haughtiness. After a few months, 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 work fair in the town of Casterbridge (a fictionalized version of Dorchester). When he finds none, he heads to another fair in Shottsford, a town about 10 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 the estate of her uncle and is now a wealthy woman. Though somewhat uncomfortable, she hires him. Meanwhile, Bathsheba has a new admirer: the lonely and repressed William Boldwood.
Boldwood is a prosperous farmer of about 40 whose ardor 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 realizing the valentine was a jest, becomes obsessed with Bathsheba and soon proposes marriage. 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, she fires him. When her 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. Afterward, she offers him his job back, and their friendship is restored.