Home » The Code of the West: Did Cowboys Really Live by One?
Cowboys on horseback gather among a large cattle herd during a roundup on the Kokernot 06 Ranch in West Texas.

The Code of the West: Did Cowboys Really Live by One?

The unwritten rules of the working West, and how they became the Code we know today.

by Chip Schweiger

Say “Code of the West” to somebody today, and they’ll usually recite it without much prompting. Never shoot a man in the back. Never steal a horse. Help a stranger in trouble. Your word is your bond. It sounds ancient, something passed down at a campfire from one weathered hand to the next, older than the barbed wire that eventually cut the range into pieces.

Put that phrase in front of an actual cowboy pushing longhorns up the Chisholm Trail in 1885, dust caked in the creases of his neck, and he would likely just squint at you. Not because he had no ethics. But because “the code of the West” wasn’t a phrase anybody in his outfit used.

That gap is the real story here. Did nineteenth-century working cowboys recognize something they themselves would have called a Code? Or did later generations take a genuine, unwritten frontier ethos and spend the better part of a century turning it into the tidy moral inventory we know now?

The honest answer sits between the two easy ones. Cowboys lived by real, enforced standards of conduct. But no one on the range called it a Code, wrote it down, or numbered its rules. That came later. Considerably later.

A Phrase Nobody Used

Life With the Outfit. Cowboys rest beside their tents, horses, and camp wagons during a roundup near Belle Fourche in 1887. Weeks spent working and living together made an outfit heavily dependent on each hand doing his share. Image: John C. H. Grabill / Library of Congress

The phrase is conspicuously absent from the best-known firsthand accounts of the cattle-drive era. Charlie Siringo’s A Texas Cow Boy, published in 1885 as the first autobiography of a working cowhand ever printed, is full of stampedes, courtships, gunplay, and long days in the saddle.

It never once organizes any of that around a formal code.

Teddy Blue Abbott’s recollections of trailing herds in the 1870s and ’80s, recorded by Helena Huntington Smith and published in 1939, remember the life with real warmth. The word “code” isn’t doing any work in his memory of it either.

Newspapers from the cattle-town years wrote about cowboys constantly. Sometimes admiringly, more often as a public nuisance, freshly paid and looking for trouble. None of that coverage describes them as living under a named code.

Cattlemen’s association minutes and range-dispute testimony argue endlessly over whose steer wore whose brand, but nothing resembling a cited moral rulebook turns up in them either.

The phrase itself appears in popular Western culture by the 1920s. Zane Grey’s Code of the West was serialized in The Country Gentleman in 1923 and adapted into a silent film two years later. It would not appear in book form until 1934. And by then, the great cattle-drive era had already been gone for decades.

Sit with that gap for a second. Fifty years separate Siringo’s memoir from Grey’s title. By 1934 the open range had already been fenced, farmed, and sold for the better part of two generations. That doesn’t say anything negative about Zane Grey’s book. But it does clarify that a cowboy in 1885 could no more have quoted you the Code of the West than he could have quoted you the next year’s cattle futures.

What Actually Governed a Hand’s Life

A Working Cowboy. Cowboy Ned Coy rides “Boy Dick” in Dakota Territory in the late 1880s, photographed by John C. H. Grabill. The skills demanded of working cowboys—horsemanship, competence, and dependability—were part of the unwritten expectations of life on the range. Image: John C. H. Grabill / Library of Congress

None of this means the range was a moral vacuum. Quite the opposite. It ran, instead, on a dense set of unwritten expectations that mattered enormously, precisely because there was no sheriff riding drag to enforce anything else.

A hand’s standing started with competence. Could he rope, could he sit a bucking horse before sunup, could he read a sky that was about to turn a herd loose in a stampede? But competence by itself didn’t earn a man a seat at the fire. He also had to be of substance.

Trail crews could be remarkably diverse by nineteenth-century standards, including white, Black, Mexican, Indigenous, and mixed-race hands. Shared work and danger sometimes created a practical equality in the saddle that was harder to find elsewhere. Even as cow country was hardly free of the racial prejudices of its time.

What mattered on the range was shared endurance and shared risk. Written contracts were rare on the range. A man’s word, and the memory other men kept of whether it had ever failed, did the job a contract now does.

Some failures were unforgivable. Stealing a horse ranked near the top, since losing your mount in open country could mean losing your life. Mistreating an animal marked a man as careless in a trade where a sore-backed horse endangered everyone riding near him.

Quitting a crew mid-drive, lying about work done, or dodging your turn at night guard branded a man unreliable in a small world with a long memory.

Borrowed From Somewhere Older

Before the Cowboy. A Mexican vaquero poses with his lariat and the distinctive riding gear of his trade. Generations before the American cowboy became a national symbol, vaqueros had developed much of the horsemanship, roping technique, equipment, and vocabulary that Anglo cowboys later adopted. Image: National Museum of American History / Smithsonian Institution

Much of this culture wasn’t invented fresh on the Texas plains. It came down through the vaquero tradition of Spanish and Mexican California and the Southwest, horseback herders who had already worked out roping, branding, and open-range handling generations before Anglo cattlemen picked it up.

Vaqueros built their own saddles, braided their own rope, and were the ones taming wild horses long before the Anglo-American cattle industry produced the cowboy culture we recognize today.

Words like buckaroo. Lariat. Chaps. All carry that inheritance right in their spelling.

The cowboy’s occupational customs were never purely his own invention. They were borrowed, adapted, and rarely credited.

Other threads of the supposed cowboy ethos weren’t specific to cattle work at all. Hospitality, keeping one’s word, personal courage, and Victorian ideals about proper conduct toward women were hardly unique to cowboys.

What made the range version feel distinct wasn’t the values themselves. It was the cost of breaking them. A hundred miles from the nearest law, a man’s reputation was often the only security he had.

The Gap Between Norm and Behavior

A fair account has to resist two easy temptations here.

The first is treating the ethos as pure fiction. Many real cowboys drank hard, gambled away their pay, fought, visited brothels, quit without notice, lied when it suited them, and sometimes stole or killed. All of that is documented. None of it is in dispute.

Dodge City and Abilene built entire local economies around separating trail hands from their wages as fast as possible once the herd was sold.

But a society holding a norm and its members consistently obeying it are two different things, and collapsing them into one is a mistake. A community can carry real, enforced expectations about honesty and loyalty while plenty of its members regularly fall short. It’s the same way a modern profession can have a genuine code of ethics that some practitioners routinely violate without the code itself being make-believe.

What made the range version notable wasn’t universal compliance. It was that violations carried real weight. A reputation for dishonesty, shirking work, or stealing stock could follow a man from outfit to outfit in a cattle country whose working community was smaller than its geography suggested.

“The Code of the West came later. The expectations behind it were already there.”

From Cowhand to Folk Hero

While actual cowboys were driving cattle with regularity and getting shot at occasionally, a separate and far more profitable business was busy turning them into something else entirely: a national symbol.

Dime novels got there first. Ned Buntline’s stories about William Cody, beginning in 1869, took a genuinely adventurous life and inflated it into something approaching frontier mythology. Cody then closed the loop himself, staging a Wild West show and dressing to match his own fictionalized cover art. Millions of Americans and Europeans who never crossed the Mississippi got their entire picture of cowboy life from an arena performance.

Owen Wister supplied the moral architecture. His 1902 novel The Virginian, dedicated to his Harvard friend Theodore Roosevelt, gave the cowboy hero quiet courage, careful speech, and instinctive honor. Something that reads less like reporting and more like a knight relocated to Wyoming.

Roosevelt’s own ranch writing lent presidential weight to the idea that cattle country built a superior kind of American character. None of this came from nowhere. Wister had genuinely lived on Wyoming ranches and drew on real observation. But what he built from that material was a literary archetype. One polished and moralized well past anything a working trail boss would have recognized as typical of his crew.

Codifying the Ethos

Working the Open Range. Cowboys gather cattle during a roundup at Moss Agate in Dakota Territory, photographed by John C. H. Grabill in the late 1880s. The enormous distances of cattle country made competence, cooperation, and reputation practical necessities rather than abstract virtues. Image: John C. H. Grabill / Library of Congress

The formal, numbered Code most people picture today took shape gradually. Mostly over the radio and at the movies. And mostly aimed at children.

Gene Autry’s Cowboy Code is usually dated to 1939, but the documented record tells a slower story. According to his biographer, Autry’s ten “cowboy commandments” developed piece by piece through the late 1940s, first surfacing in his radio dramas around 1947 and reaching print in studio press materials by 1949.

As early as August 1947, Autry had pronounced cowboy-code mandates during his Melody Ranch radio show. And his Ten Cowboy Commandments continued to evolve through publicity, including in the 1949 Riders in the Sky press book.

Flag that for the record: the widely repeated “1939” date doesn’t match the documented publicity trail. Roy Rogers and Hopalong Cassidy issued similar creeds for their young audiences around the same years. Each would lean on honesty, respect for elders, and clean living. A set of values with an obvious family resemblance to the Boy Scout Law being promoted in American culture at the same moment.

Grey had already put the phrase into circulation in 1934. Three decades after that, folklorist Ramon F. Adams gave the idea its most influential scholarly gloss, arguing in 1969 that the lack of written law on the range had forced cattlemen to frame rules of their own.

Now Adams was a serious researcher of cowboy language and lore. But he was writing in 1969 about a world that had closed nearly a century earlier. He was compiling and interpreting oral tradition, not quoting contemporary cowhands who used the phrase themselves.

The most recent turn came in 2010, when Wyoming’s legislature adopted “The Code of the West” as the state’s official code of ethics, drawing directly on a 2004 book applying cowboy values to corporate conduct. By then, a genuine occupational ethos had become formal state policy. A full circle, it would seem, from bunkhouse custom to statute.


The Code of the West didn’t begin as a list of rules, and it didn’t come from a single author. In this companion episode of the Way Out West podcast, we follow the idea from the working cattle range through Western fiction, Hollywood, and the cowboy codes that eventually put an unwritten ethos on paper.


“Ride for the Brand,” Examined

The Brand Before the Metaphor. Cowboys restrain and brand a calf during a roundup in Dakota Territory in the late 1880s. A ranch’s brand identified ownership of its livestock long before “ride for the brand” became a popular expression for loyalty to an outfit or employer. Image: John C. H. Grabill / Library of Congress

No phrase illustrates the code-versus-ethos problem better than this one.

The underlying fact is solid. A brand marked ownership. And a hired hand’s job included protecting his employer’s stock, including unbranded mavericks that should go into the outfit’s tally rather than his own pocket. That much has real grounding in range practice.

But the phrase’s familiar meaning today is an almost sacred pledge of total loyalty regardless of personal feelings toward the boss. A meaning that gets far more elaborate treatment in twentieth-century cowboy poetry and fiction than in any nineteenth-century source.

Louis L’Amour built a mid-century short story around it, describing it in his preface as an expression of loyalty to an employer, considered a compliment of the highest order.

Whether working cowboys of the 1880s actually used the phrase in that fully moralized sense, or whether it picked up its heavier meaning later in poems and novels and motivational business books, is a question the surviving record can’t cleanly settle. So let’s treat that as contested, not proven.

What the Old Hands Knew

For your consideration, three questions with three answers.

First, was there a formal, commonly recognized “Code of the West” among working nineteenth-century cowboys? No. The phrase and the numbered list are twentieth-century inventions. They arrived first through Zane Grey’s fiction. Then through radio and movie cowboys built for young listeners.

Secondly, was there nevertheless a real, recognizable ethos governing work, behavior, and reputation? Yes, and it ran deep. Competence, honesty, keeping your word, caring properly for your horse, doing your share, and helping someone in trouble were not decorative ideas. They were how a man kept his job, his safety, and his standing in a small, interdependent, and often lawless world.

And, finally, when and how did that ethos become a Code? Gradually, through dime novels and Wild West shows that turned working cowhands into folk heroes, through Wister and Roosevelt, who gave that hero a moral architecture, and finally through Grey, Autry, Adams, and eventually the state of Wyoming. Each taking a real but informal inheritance and pressing it into something you could print, number, and hang on a wall.

The old hands didn’t need that list. A man who broke his word, ran a horse into the ground, or slipped out on his outfit mid-drive found out fast. Not because a rule told him so. But because the people around him simply quit trusting him with anything that mattered.

That was the ethos. Nobody had to write it down, because everybody who needed to know it learned soon enough what the people around him expected. The Code of the West came later. The expectations behind it were already there. —☆


This story started with what sounded like a fairly simple historical question: Who wrote the Code of the West?

The trouble was that the further I went back, the less there was to find.

The cowboys who actually worked the nineteenth-century cattle range left behind memoirs, recollections, newspaper accounts, and plenty of stories about how a hand was expected to behave. What they didn’t leave behind was a document called the Code of the West.

That changed the question.

Instead of looking for the person who wrote the original code, I began looking for the point where unwritten expectations became written rules. That trail led out of the cattle camps and into dime novels, Wild West shows, Western fiction, radio, movies, and eventually even the Wyoming legislature.

The result was more interesting than finding an author would have been. The Code of the West wasn’t simply invented, and it wasn’t handed down intact from the cattle-drive era, either.

It evolved.

And somewhere along the way, a working culture became an American philosophy.


Frequently Asked Questions

Did cowboys really have a Code of the West?

Not in the formal sense we know today. Nineteenth-century cowboys appear to have lived by unwritten expectations concerning competence, honesty, loyalty, reputation, care of livestock, and doing one’s share of the work. There is little evidence that working cowboys called these customs the “Code of the West” or followed a numbered list of rules.

Who wrote the original Code of the West?

There was no single original author. The idea developed gradually through Western literature and popular culture. The phrase was circulating by the early twentieth century, while writers and performers including Zane Grey and Gene Autry helped turn an older, unwritten Western ethos into something more formal.

Did Gene Autry write the Cowboy Code?

Gene Autry popularized one of the best-known formal cowboy codes, but he did not invent the underlying values. His Cowboy Code developed during the late 1940s for his largely young radio and movie audience and emphasized honesty, good conduct, respect, and personal responsibility.

What does “ride for the brand” mean?

Today, “ride for the brand” generally means loyalty to the ranch, outfit, employer, or organization you represent. Brands literally identified cattle ownership, but evidence that nineteenth-century cowboys commonly used the phrase with its modern moral meaning is less certain. Much of that meaning was popularized later through Western literature and cowboy culture.

What is the Code of the West today?

There is no universally accepted version. Numerous cowboy codes have appeared in books, films, radio programs, organizations, and business writing. Wyoming even adopted a ten-point “Code of the West,” derived from James P. Owen’s Cowboy Ethics, as its official state code in 2010.

Continue Exploring the West

Share a Thought

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Way Out West

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from Way Out West

Subscribe now to keep reading and get access to the full archive.

Continue reading