Written in Jack Kerouac's signature easy and free-flowing style, The Dharma Bums tells the story of Ray Smith and his adventures as a hitchhiker, mountaineer, and aspiring Buddha. Between meditation and revelry, Ray, who is modeled off of Kerouac himself, finds steadfast friendship and meaning in the wide and crazy world. The novel opens with Ray Smith meeting an old bum while traveling on a freight train in California. Inspired, he calls the man a "Dharma Bum" and then begins to recount a series of adventures that he has undergone with other such free-spirited people.
Ray attends a rowdy poetry jam at "Gallery Six" in which a number of his friends perform, but he is more impressed by the forthright poetry of Japhy Ryder. Ray and his friend Alvah Goldbook share a small cottage in Berkeley, and Japhy lives down the street in an even more humble dwelling. He proves to be a serious and meditative Buddhist scholar as well as a party animal who shares alcohol and women with his friends.
Ray, Japhy, and chattering maniac Henry Morley soon set off to climb the daunting Matterhorn Peak in California's Sawtooth Ridge. There Ray enjoys the simple pleasures of creating spontaneous haikus and hiking to bold new locations with good friends. At times, he feels euphorically confident and alive. Upon descending to reality, however, Ray experiences the suicide of one of his friends. This is one of the factors that contributes to his decision to leave his cottage and hike cross-country to his family in North Carolina, his possessions stowed securely in a rucksack on his back. As he travels, he experiences many enlightening meditation sessions and meets a variety of colorful characters.
Despite Ray's compassion for humanity, he finds that he is often misunderstood. His relatives grow irritated with his idleness and refusal to work or participate in family affairs. They do not understand his developing understanding of the world as neutrally meaningless, and thus wonderful. Ultimately, Ray leaves his family to return to live with Japhy, who is living his admirably simple life in the shack of one of their friends, Sean Monahan.
Monahan's economical shack is also the site of enormous parties, which Ray and Japhy participate in but soon tire of. Together, they sneak away from a party held in preparation for Japhy's upcoming departure to a Japan monastery and hike to the coastline before sadly parting from each other. Ray, following Japhy's advice, decides to work as a fire lookout on lonely Desolation Peak in the Cascade Range. Ray's experience on there is overwhelmingly positive and enlightening. He begins to feel that he truly understands things as they are before he descends the mountain to face the world again.