Aug. 12, 2026

Who Actually Wrote the Code of the West?

Who Actually Wrote the Code of the West?
Who Actually Wrote the Code of the West?
Way Out West | Stories of the American West: Cowboy Tales & Western Lore
Who Actually Wrote the Code of the West?

The Code of the West tells us to keep our word, do our share, and help someone in trouble. But did real cowboys actually live by a written code? Discover how working customs, Western mythology, and Hollywood created the code we know today.

Who Actually Wrote the Code of the West?

The cowboy lived some of it. Storytellers shaped some of it. And later generations finally gave it a name and numbered the rules.

We hear about the Code of the West all the time.

Keep your word. Do your share. Help someone who's in trouble. Finish what you start. Take responsibility for yourself. Ride for the brand.

It sounds like something cowboys must have carried with them across the nineteenth-century West.

But did they?

There was no official cowboy rulebook. No single document passed from ranch to ranch. And there's surprisingly little evidence that working cowboys of the nineteenth century commonly described their customs as "The Code of the West."

What they did have were expectations.

In this episode of Way Out West, we trace those unwritten customs from the working cattle culture of the nineteenth century through dime novels, Buffalo Bill, Theodore Roosevelt and Owen Wister, and into the Hollywood West of Gene Autry and Roy Rogers.

Along the way, we'll discover how practical expectations about reputation, hard work, loyalty and keeping your word gradually became part of the cowboy mythology—and how later generations finally turned those ideals into the numbered codes we recognize today.

Because nobody sat down and wrote the Code of the West.

The West lived some of it. Storytellers shaped some of it. And later generations decided which parts were worth carrying forward.


What You'll Hear

  • Whether nineteenth-century cowboys actually lived by a "Code of the West"
  • What Theodore Roosevelt observed about cowboys and cattle culture in the 1880s
  • Why reputation, competence and keeping your word mattered in the working West
  • How dime novels, Buffalo Bill and Owen Wister helped transform the cowboy into an American ideal
  • How Gene Autry's Cowboy Code turned Western values into explicit rules
  • Why Roy Rogers created his own Rider's Rules for young fans
  • How Cowboy Ethics brought the Code of the West into the twenty-first century
  • Why there has never been one official or historically definitive Code of the West
  • How something can be partly mythology and still preserve something real

Cowboy Glossary Term of the Week

Ride for the Brand: On a working ranch, the brand identified ownership of livestock. But riding for the brand came to mean something larger: loyalty to the outfit and the people you've committed yourself to.

You hired on to do a job, and while you rode for that outfit, you represented it.

Today, the expression is used far beyond ranching to describe loyalty to an organization, a group of people, or a set of principles.

And like much of the modern Code of the West, its meaning has grown larger than the literal cowboy work that gave it life.


Ride Way Out West

The Code of the West may never have existed as a single set of rules carried by nineteenth-century cowboys.

But many of the values we associate with it—keeping your word, doing your share, taking pride in your work, helping someone in trouble, and knowing where to draw the line—have genuine roots in the working West.

Perhaps that's why we're still talking about them.

If you enjoyed this episode, there are more stories waiting for you.

Explore the Way Out West Journal for in-depth stories about cowboy history, ranching, Western culture, and the people who shaped the American West. You can also subscribe to the weekly newsletter for new stories, podcast episodes, and photographs delivered straight to your inbox.

Because the Code of the West wasn't written once.

In some ways, we're still writing it.

03:29 - Chapter 1 – Before There Was a Code

06:41 - Chapter 2 – When The West Became a Story

10:02 - Chapter 3 – Hollywood Writes Down the Rules

13:14 - Chapter 4 – Everybody Gets a Code

15:31 - Chapter 5 – So, Who Wrote the Code of the West?

18:42 - Chapter 6 – Closing Thoughts

19:54 - Chapter 7 – Buster the Bull & Cowboy Glossary Term of the Week

20:45 - Chapter 8 – Thanks for Listening

We talk about the Code of the West as though somebody once sat down beside a campfire and wrote the rules.

But who?

There was no cowboy legislature.

No trail-drive employee handbook.

No laminated copy hanging in the bunkhouse.

And yet, more than a century later, most of us could probably come pretty close to describing what the Code of the West is supposed to mean.

Keep your word.

Do your share.

Help somebody who's in trouble.

Take responsibility for yourself.

Respect the land.

Finish what you start.

Don't take advantage of somebody weaker than you.

And maybe above all else…

Do the right thing when nobody is watching.

It certainly sounds like a code.

There's just one problem.

The cowboys of the nineteenth century don't appear to have written it down.

In fact, there's surprisingly little evidence that they even called it a code.

So where did it come from?

And who actually wrote the Code of the West?

The answer turns out to be much more interesting than a list of cowboy rules.

Because nobody wrote it.

And in another sense…

A whole lot of people did.

[Music Up]

Howdy. Chip Schweiger, here.

Welcome to another edition of Way Out West.

Where the stories of the American West are told...

Cowboy wisdom is earned...

And the legacy of the American cowboy still rides on.

Imagine you're riding with a cattle outfit somewhere in the American West in the late nineteenth century.

You're a long way from town.

There isn't a supervisor watching every move you make.

There isn't much paperwork.

There certainly isn't a human resources department.

And when something goes wrong, there may not be anybody coming to help.

Your world is mostly the people riding beside you.

If a storm scatters the herd, everybody has a job.

If a horse goes down, somebody has to deal with it.

If a man doesn't pull his weight, somebody else has to do his work.

And if you're riding night herd at two in the morning, you'd better be able to trust the man who's supposed to relieve you.

That kind of life creates expectations.

Some are practical.

Some are social.

And some begin to look a lot like morality.

Keep your word.

Do your work.

Don't shirk.

Take care of your horse.

Don't steal from the outfit.

Don't make trouble somebody else has to clean up.

And when things go bad, don't disappear.

Nobody necessarily needs to write those rules down.

Everybody learns them soon enough.

And that may be the first thing we have to understand about the Code of the West.

The Code probably wasn't written once.

It was lived first.

Then it was remembered.

Then it was romanticized.

And eventually, it was written down by a whole lot of different people.

But to understand how that happened, we have to start before anybody was talking about a Code of the West at all.

Before we saddle up, remember you'll find additional resources for today's episode in the show notes at WayOutWestPod.com/ code-of-the-west

Chapter 1 – Before There Was a Code

One of the best witnesses we have to the cattle country of the 1880s is Theodore Roosevelt.

Long before he became president, Roosevelt went west and ranched in the Dakota Territory.

And in 1888, he published a book called Ranch Life and the Hunting-Trail.

What makes Roosevelt useful for us is that he actually described the character and expectations he encountered among cowboys.

He wrote that there was a high regard for truthfulness and keeping one's word.

He noted contempt for hypocrisy.

And he said cowboys had little patience for a man who shirked his work.

There it is.

Keeping your word.

Doing your share.

Pulling your weight.

All things we would recognize today as part of the Code of the West.

But Roosevelt doesn't present us with ten rules.

He doesn't say every cowboy lived according to some formal creed.

And he certainly doesn't describe saints on horseback.

In fact, almost in the same breath, he tells us that plenty of cowboys gambled and drank.

He says they could be quick to avenge an insult.

And he acknowledges that they weren't particularly frightened by the possibility of violence.

Which is worth remembering.

Because modern versions of the Code of the West have a tendency to clean everybody up considerably.

Real cowboys were human beings.

Some were honorable.

Some weren't.

Some were generous.

Some were thieves.

They drank, gambled, fought, lied, cheated and occasionally did things considerably worse than that.

There was racial prejudice.

There was exploitation.

There was violence.

And there were cattlemen who weren't above bending a law when the law became inconvenient.

So when we talk about an unwritten cowboy ethic, we're talking about expectations and ideals.

Not universal behavior.

But those expectations mattered.

A trail crew moving thousands of cattle hundreds of miles couldn't function if nobody trusted anybody.

An outfit depended on competence.

A man's reputation mattered because reputation told other people whether they could depend on him.

And that extended beyond the trail.

In isolated country, hospitality wasn't simply good manners.

Sometimes it was survival.

A stranger might need water.

A traveler might need food.

Someone might need help with a horse.

And tomorrow, you might be the stranger.

Even the small customs mattered.

You didn't simply help yourself to another man's horse or equipment.

You took care of what had been entrusted to you.

You closed a gate behind you.

You did your job.

None of this required a constitution.

It was closer to occupational culture.

And cowboys weren't unique in having one.

But here's where the story gets interesting.

If these cowboys were living by something we now call the Code of the West…

Did they call it that?

The evidence says we should be careful.

Chapter 2 – When The West Became a Story

Search nineteenth-century cowboy accounts looking for a neat list called "The Code of the West," and you're likely to be disappointed.

That doesn't mean there were no codes of behavior.

Clearly there were.

It means the phrase and the thing aren't necessarily the same.

And that's an important distinction.

The customs came first.

The name seems to have come later.

By the end of the nineteenth century, something else was happening anyway.

The working West was becoming the story of the West.

And remarkably, that process began while the old cattle frontier was still alive.

Dime novels had already turned Western figures into popular heroes.

In 1869, Ned Buntline introduced Buffalo Bill Cody to a mass reading audience.

Then Cody did something even more powerful.

He put the West onstage.

Buffalo Bill's Wild West opened in the 1880s and eventually carried its version of the frontier across the United States and Europe.

Audiences saw horsemanship.

Marksmanship.

Cowboys.

Indians.

Stagecoaches.

Battles.

Danger.

Heroism.

History and entertainment became thoroughly mixed together.

And millions of people who would never work cattle now had an image of what a Western man was supposed to be.

Then, in 1902, Owen Wister published The Virginian.

And this matters.

Because Wister helped establish one of the most durable characters in American culture.

The cowboy as moral hero.

His Virginian isn't admirable merely because he can ride or shoot.

He possesses an internal sense of honor.

He knows where he stands.

He has a personal standard.

And when formal institutions seem inadequate, he makes moral decisions according to that standard.

It's not difficult to see the beginnings of what later generations would call a Western code.

But notice what's happening.

We're moving away from describing how an actual trail crew functions.

We're moving toward asking what the cowboy represents.

That's a very different question.

Theodore Roosevelt was doing something similar in his own way.

Roosevelt admired what he saw as the strenuous virtues of frontier life.

Courage.

Self-reliance.

Hard work.

Vigor.

The ability to endure discomfort without complaining too much about it.

And gradually the cowboy became more than someone who worked cattle.

He became a type of American.

Independent.

Capable.

Plainspoken.

Loyal.

Tough.

Honorable.

Now, not every real cowboy fit that description.

Probably not even close.

But mythology doesn't require everybody to fit the model.

It requires the model to be compelling enough that people want to remember it.

And then motion pictures arrived.

The Western hero moved from the page to the screen.

Soon millions of Americans weren't merely reading about what a cowboy ought to be.

They were watching him.

And that's when the unwritten code finally started getting written down.

Chapter 3 – Hollywood Writes Down the Rules

By the 1930s and '40s, the cowboy had become one of America's great popular heroes.

And few cowboys were more popular than Gene Autry.

Autry wasn't just a movie star.

He was on radio.

He made records.

He appeared in comic books.

Later, television.

And his audience included millions of children.

Which presented an interesting opportunity.

If the cowboy was a hero…

Why not tell children exactly how a cowboy should behave?

In August of 1947, on his Melody Ranch radio program, Autry recited something called "The Code of the Cow Country."

It included ideas that would sound very familiar to anyone who knows the modern Code of the West.

Hospitality.

Respect.

Taking care of stray livestock.

Closing pasture gates.

Keeping your word.

Treating a horse properly.

Over the next few years, those ideas evolved into what became known as Gene Autry's Cowboy Code, or the Cowboy Commandments.

And now there really were ten rules.

Don't take unfair advantage.

Keep your word.

Tell the truth.

Be gentle with children, older people and animals.

Help people in distress.

Be a good worker.

Respect the law.

Be patriotic.

This is an extraordinary moment in the story.

Because something has changed.

The nineteenth-century working cowboy had informal customs because his job and community required them.

The twentieth-century screen cowboy had explicit rules because children were watching.

Somewhere between the trail drive and Saturday morning entertainment…

The cowboy got an employee handbook.

And Gene Autry wasn't alone.

Roy Rogers had his Rider's Rules.

Be neat and clean.

Be courteous.

Obey your parents.

Protect the weak.

Be brave.

Study hard.

Be kind to animals.

Respect the flag and country.

These aren't instructions for moving three thousand longhorns from Texas to Kansas.

They're instructions for raising good kids.

And that's the transformation.

The cowboy had become a moral teacher.

Now, it would be easy to dismiss this as Hollywood simply inventing the whole thing.

But I don't think the evidence supports that either.

Gene Autry didn't invent the idea that a cowboy should keep his word.

Theodore Roosevelt had observed that value in cattle country decades earlier.

Autry didn't invent the expectation that a man should work hard or help someone in genuine trouble.

Those ideas had much older roots.

What Hollywood did was select certain Western ideals…

Clean them up…

Add a few values appropriate to mid-century America…

And write them down.

The Code was becoming formal.

But it still wasn't the Code.

Because there were already different versions.

And there would soon be many more.

Chapter 4 – Everybody Gets a Code

Once you start looking for the Code of the West today, something strange happens.

You find it everywhere.

And they're not all the same.

One version tells you to always finish what you start.

Another tells you never to shoot first.

Another says ride for the brand.

Another says take pride in your work.

Another tells you to remove your hat indoors.

Some are serious.

Some are sentimental.

And some appear to have been assembled by somebody who has watched quite a few Westerns.

That variety tells us something.

There isn't one historical document sitting in an archive somewhere called The Official Code of the American Cowboy.

There's no original copy signed by Charles Goodnight and passed down through generations of ranch hands.

Instead, people keep trying to capture the idea.

One of the most influential modern attempts came in 2004.

A retired Wall Street executive named James P. Owen published Cowboy Ethics: What Wall Street Can Learn from the Code of the West.

The timing wasn't accidental.

Corporate America had been rocked by major scandals.

Owen looked toward the working cowboy as a model of personal integrity and developed ten principles.

Live each day with courage.

Take pride in your work.

Always finish what you start.

Do what has to be done.

Keep your promises.

Be tough, but fair.

Ride for the brand.

Talk less and say more.

Remember that some things aren't for sale.

And know where to draw the line.

It's a compelling list.

I happen to like quite a bit of it.

But it isn't a nineteenth-century cowboy document.

It's a modern interpretation of Western values.

And that's not a criticism.

It's simply important to know what we're looking at.

Owen was doing in the twenty-first century what storytellers had been doing for more than a hundred years.

Looking backward at the cowboy…

Selecting certain qualities…

And asking what they might mean now.

Which finally brings us back to our original question.

Who wrote the Code of the West?

Chapter 5 – So, Who Wrote the Code of the West?

The best answer I can give you is… Nobody.

At least not in the way we usually imagine.

There doesn't appear to have been one historical Code of the West handed down from cowboy to cowboy.

There was no canonical list.

And the evidence that nineteenth-century working cowboys commonly described their occupational customs using that exact phrase is weak.

But that doesn't mean the whole thing was invented out of thin air.

Because underneath the mythology are things we can document.

Working Westerners really did place value on reputation.

Keeping your word mattered.

Doing your share mattered.

Competence mattered.

Loyalty mattered.

Hospitality mattered.

Self-reliance mattered.

Those weren't quaint sayings for a gift-shop sign.

In isolated communities and dangerous work, they had practical value.

Then the West changed.

The great cattle drives faded.

The frontier closed.

And the cowboy became something larger than his occupation.

Writers turned those customs into character.

Buffalo Bill turned the West into spectacle.

Owen Wister helped turn the cowboy into a moral hero.

Hollywood turned that hero into an example.

Gene Autry and Roy Rogers wrote down rules.

And later generations took the values they admired most and organized them into new codes of their own.

So maybe the Code of the West is both real…

And invented.

The real part came from people adapting to difficult country and difficult work.

The invented part came when later generations tried to explain what those people represented.

And maybe that's why there isn't one Code of the West.

There couldn't be.

Because every generation has rewritten it a little.

We've dropped some things.

Added others.

And occasionally claimed that our particular version came straight from an old bunkhouse wall in 1883.

It probably didn't.

But here's the part I wouldn't dismiss.

Mythology doesn't always mean something is false.

Sometimes mythology is what happens when a culture looks backward and decides which parts of its past are worth carrying forward.

We don't need to pretend every nineteenth-century cowboy kept his word.

They didn't.

We don't need to pretend every rancher was fair.

They weren't.

And we certainly don't need to turn the Old West into some lost age of perfect character.

It wasn't.

But people noticed something in that life.

Dependability.

Courage.

Competence.

Responsibility.

A willingness to help when help was actually needed.

The belief that your word ought to mean something.

And generation after generation decided those things were worth remembering.

So, who wrote the Code of the West?

The cowboy lived some of it.

The storyteller shaped some of it.

Hollywood polished some of it.

And later generations finally gave it a name and numbered the rules.

Maybe nobody wrote the Code of the West.

Or, maybe we still are.

Chapter 6 – Closing Thoughts

There's something reassuring about imagining that somebody wrote all of this down a long time ago.

That somewhere there's an original list telling us exactly what a cowboy was supposed to be.

History usually isn't that tidy.

The Code of the West wasn't handed to us whole.

It accumulated.

Some of it came from necessity.

Some from memory.

Some from literature.

Some from Hollywood.

And some from what later generations wished the West had been.

But maybe the better question isn't whether every line of the Code is historically authentic.

Maybe it's why we keep returning to it.

More than a century after the great trail drives ended, people still respond to the idea that your word should mean something.

That you ought to finish what you start.

That you should take pride in your work.

That you help somebody who's truly in trouble.

And that some things simply shouldn't be for sale.

Those ideas don't belong exclusively to cowboys.

They never did.

But the American West gave us one particularly memorable way of talking about them.

And maybe that's worth carrying forward.

Chapter 7 – Buster the Bull & Cowboy Glossary Term of the Week

OK, before we ride out today, we’ve got one more thing

[BULL SOUND]

Yep, that distinctive call from Buster the Bull means it’s time again for our cowboy glossary term of the week. 

This week's cowboy glossary term is ride for the brand.

On a working ranch, the brand identified ownership of livestock.

But "riding for the brand" came to mean something larger.

It means loyalty to the outfit.

You hired on to do a job, and while you rode for that outfit, you represented it.

Today you'll hear the phrase used far beyond ranching.

It means being loyal to the people and principles you've committed yourself to.

And like quite a bit of the Code of the West, the modern meaning has grown larger than the literal cowboy work that gave it life.

[MUSIC UP AND FADE]

Chapter 8 – Thanks for Listening

Well, that’s all for this episode of Way Out West. Thanks for riding with me here

If you enjoyed the episode, please follow, rate, and share the show 

with someone who loves the history, culture, and traditions of the American West.

And if you'd like to see more of the work we're doing, 

you can visit RideWayOutWest.com. 

And while you're there, take a few minutes to explore the Way Out West Journal, where we dive even deeper into the people, places, and history that continue to shape the West today.

That’s RideWayOutWest.com

Until next time, this is Chip Schweiger, 

reminding you that the best traditions aren't necessarily the ones somebody wrote down.

They're the ones people decide are still worth living.

We'll see ya down the road.