Early in the morning in Wyoming, Ennis sips coffee and thinks of the dream he had the night before, where he was with Jack Twist. He reflects on when they first met in 1963.
They meet after signing up to manage sheep on Brokeback Mountain. Ennis sleeps with the sheep to ward off coyotes; Jack stays back and tends the camp. Over time, the men become closer and closer. After one long night of drinking at camp, Ennis says that it's too late to ride back to the sheep. Jack offers to share his tent, due to the cold. In the tent, the men have anal sex.
After the job ends, they return to their regular lives, both getting married to women. Four years later, Jack reaches out by letter. They meet again and make love. Jack dreams aloud of living with Ennis alone on a ranch; Ennis worries about the impracticality and risk of leaving their lives behind.
Fifteen years pass. Ennis gets a divorce, due to his infidelity, and travels around working odd jobs. Jack joins. At the end of their journey, Ennis tells Jack that they won't be able to meet again for several months. Jack explodes, telling Ennis that they "coulda had a good life together," but instead, lived the past twenty years full of longing and distance.
Years later, Ennis learns by post that Jack died in a freak accident, although Ennis suspects it was a homophobic hate crime. He visits Jack's family and learns Jack always wanted to be buried on Brokeback Mountain, and that he had fantasized about owning a ranch with Ennis. In Jack's room, Ennis finds one of his old flannels.
Shortly after, Jack begins to appear in his dreams. Ennis mulls over how he never could imagine or realize a safe and happy future with Jack, and decides that "nothing could be done, and if you can't fix it you've got to stand it."