In the summer of 1963, two young men meet when they find work sheep-herding for the summer on Brokeback Mountain, a fictional, picturesque setting in Wyoming. Ennis Del Mar (Heath Ledger
) is 19, engaged to be married in the fall, and aspires to someday run his own ranch, following in the footsteps of his parents, who died in a car crash and left young Ennis and his brother and sister alone to fend for themselves. Jack Twist (Jake Gyllenhaal
) is about the same age and dreams of becoming the greatest rodeo cowboy alive. Both feel essentially alone in the world.
While sharing a sheephand's backbreaking work load, facing the toil and troubles of the weather, shortages of food, and wild animal attacks, their working friendship eventually develops into something more. Breaking their employer's rule that one man must sleep with the sheep and one at the camp, one night after an evening of boozing and shooting the bull, they end up sharing the tent to avoid freezing. The bitter cold leads to their sleeping spooned, Jack initiates touching, and Ennis eventually responds. Over the next several days, the two increasingly give in to their attraction to one another.
When the summer ends, the two men separate and continue with their lives. Ennis marries Alma (Michelle Williams
), who soon gets pregnant and gives birth to two daughters, Alma Jr. and Jenny. Jack, by contrast, is still drawn to other men, and remains unmarried until he meets and, after a drunken one-night stand, has a son with feisty cowgirl Lureen Newsome (Anne Hathaway
), whose father owns a profitable business selling farming machinery in Texas and openly looks down on Jack. Searching for acceptance, approval, and unconditional love, Jack writes to Ennis in 1967, when they arrange to meet again.
When Jack arrives in Wyoming, both men passionately kiss. Ennis makes a weak attempt to be discreet, but the kiss is seen by Alma, who becomes sickened by it. From this point on Ennis and Jack's relationship rebuilds and develops even more deeply.
Alma becomes increasingly suspicious about the men's frequent "fishing trips" up to Brokeback Mountain, and eventually Alma and Ennis divorce in November 1975, with Alma getting custody of their daughters.
As soon as he hears the divorce is final, Jack shows up in Wyoming hoping to now be able to live a life ranching with Ennis, who is torn, as he too longs for the idyllic life Jack describes, but he explains that if they dare to live together, they will be killed by the locals for being "queer." This leads to an arrangement whereby Jack drives from Texas to Wyoming to meet with Ennis three or four times a year, each meeting leading to another emotional departure.
By 1978, Ennis is desperately struggling to make ends meet and pay child support, and becomes briefly involved with a waitress, Cassie Cartwright (Linda Cardellini). As a result, Ennis meets less frequently with Jack, who visits Mexico looking to satisfy his physical needs in seedy underground gay bars and clubs. When Jack taunts Ennis with this information in an effort to make him jealous, he ends his rant by saying "I wish I could quit you!"
In 1980, Ennis gets a postcard he sent Jack returned with "Deceased" marked across it. When Ennis contacts Lureen, she tells him Jack was accidentally killed by a tire iron while changing a flat. All the while, Ennis envisions Jack being beaten to death by a homophobic mob for being "queer," just as Ennis had described happened to a neighbor he knew as a child. Lureen also tells Ennis that Jack wanted his ashes spread at his favourite place, Brokeback Mountain.
Ennis goes to visit Jack's childhood home, where Jack's father (Peter McRobbie) insists that Jack's ashes will be placed in the family burial plot. At Jack's mother's (Roberta Maxwell) invitation, Ennis visits Jack's bedroom, where he find two shirts, his and one of Jack's, worn by the two young men in the summer of 1963, and smeared with their blood from a fight. The shirts hang together on the same hanger, tenderly folded into one another, Jack's denim shirt with Ennis's dress shirt inside. Ennis takes the shirts with him when he leaves.
Ennis moves out of town into a low, bare, and scantily furnished trailer, alone; he now has nothing and no one. Jumping forward to 1983, a visit from his 19-year-old eldest daughter Alma Jr. (Kate Mara) brings happy news and a sense of hope, as she is engaged. Ennis wants only to know if her boyfriend "really" loves her. She says he does, invites Ennis to the wedding, and leaves. Ennis sits, beaten down by years of hard work and alcohol, weathered, aged, and heartbroken. With him... his and Jack's shirts, still entwined, now reversed, Ennis' shirt over Jack's, and a postcard with a picture of Brokeback Mountain.