Rosanne Cash wrote this song with Kris Kristofferson and Elvis Costello, both of whom also feature on the track. Cash had already written the first verse from the perspective of a mother who lost a child to gun violence. Kristofferson and Costello then contributed verses of their own from the viewpoint of the child's father and brother, respectively.
Cash has known Kristofferson since she was a teenager, and she has been close friends with Costello since the 1980s. She told Mojo magazine the story of the song:
"Elvis and I go way back. I had written the first verse - I've been involved in anti-gun violence for 20 years and the song came from that - and I just saw Kris and Elvis and I writing this song together. They both said yes. Then it was a matter of figuring out the one day in the year that we would all be in New York together. In fact, we wrote the rest of 8 Gods in a studio that same day. It was amazing, with Elvis and I looking to Kris like he was the great oracle and both of us kind of kissing the hem of his garment. (laughs).