Scroll to the end of the article to hear the song.

Nobody remembers the exact day. But the hallway is still part of the story. It ran through a busy Nashville recording studio in the late 1960s, and in it, a janitor put down what he was doing to listen to a friend recite poetry.

The Janitor Who Walked Away From Everything

The janitor was Kris Kristofferson. He did not look like a man headed for the Country Music Hall of Fame. He was a Rhodes Scholar and an Army captain, and he had been offered a job teaching English at West Point. He turned it down to write songs in Nashville.

Few people thought that was a good idea. His family was stunned. His marriage was falling apart. Money was always short. To stay close to the music, Kris Kristofferson took a job sweeping floors and emptying ashtrays at Columbia’s studio. Stars came and went, and he would hand his songs to anyone who might listen.

One of the stars who recorded there was Johnny Cash.

A Friend in the Hallway

By the late 1960s, Johnny Cash was one of the biggest names in American music, and he was also in deep trouble. Pills and exhaustion had worn him down, and the people around him were scared for him.

That day in the hallway, Johnny Cash was reciting poetry he had written himself. Kris Kristofferson stood and listened. He later said that as he watched his friend, he saw a man about one step away from dying.

Many people would have walked away and felt sorry for him. Kris Kristofferson did something else: he turned what he saw into a song.

A Song About a Hungry Songwriter

The song he wrote was “To Beat the Devil.” It is told like a short story. A broke, hungry songwriter wanders Music Row on a cold winter night and ducks into a dim bar to get warm. A weathered stranger starts talking to him, and the gist is that the world doesn’t want to hear the truth, so why keep singing it?

The songwriter listens and almost believes him. Then he walks out into the cold carrying the stranger’s song, and he keeps singing anyway.

The song is about Johnny Cash, and it is also about Kris Kristofferson himself: both were men who had been told no again and again and had to decide whether to keep going.

The Man in the Hallway Sang It First

Here is the twist many fans don’t know. Before Kris Kristofferson ever released the song, Johnny Cash recorded it.

Johnny Cash recorded “To Beat the Devil” in 1969 for his album Hello, I’m Johnny Cash, released in early 1970. By then his life had changed. He had married June Carter in 1968, and with her help he was fighting his way back.

June Carter Cash is all over that album. Her duet with Johnny Cash, “If I Were a Carpenter,” won the couple a Grammy. The man Kris Kristofferson once saw one step from dying was now singing that song next to the woman who had helped pull him back.

A Dedication That Said Everything

A few months later, Kris Kristofferson released his own version on his 1970 debut album, Kristofferson. He did not just sing it. He opened with a spoken introduction about meeting a wasted friend in the hallway of a recording studio and seeing how close he was to the edge.

Then he said he was happy that his friend wasn’t wasted anymore and had found a good woman. He ended the introduction with a dedication:

“I’d like to dedicate this to John and June, who helped show me how to beat the devil.”

Why the Song Still Hits Home

Kris Kristofferson went on to write some of the most loved songs in country music, and he and Johnny Cash stayed friends for life, later touring together as members of The Highwaymen. Still, “To Beat the Devil” holds a special place. It began in a moment almost nobody saw: a janitor, a struggling star, and some poetry in a studio hallway.

The song didn’t save Johnny Cash. Johnny Cash and June Carter did that hard work themselves. What the song did was say thank you, from one man who nearly gave up to another who nearly didn’t make it.

Anyone who has been told to quit, or watched someone they love struggle, will probably find that the song still hits close to home.