Several songs on Moon Pix— "No Sense," "Say," "Metal Heart," "You May Know Him" and "Cross Bones Style"— were written "in one deranged night," following a hallucinatory nightmare Marshall had in the fall of 1997, while alone in the South Carolina farmhouse she shared with her then-boyfriend, Bill Callahan. "I got woken up by someone in the field behind my house in South Carolina," she explained. "The earth started shaking, and dark spirits were smashing up against every window of my house. I woke up and I had my kitten next to me...and I started praying to God to help me...So I just ran and got my guitar because I was trying to distract myself. I had to turn on the lights and sing to God. I got a tape recorder and recorded the next sixty minutes. And I played these long changes, into six different songs. That's where I got the record."
In a 2013 interview with Rob Hughes of The Daily Telegraph, Marshall again recounted the experience:
"I was by myself for three months in the country, surrounded by fields. One morning I had a vision, woke up and could feel something beyond the trees outside my window. Then I heard a voice: ‘Chan, come and meet me outside and all the past will be forgotten.’ I remember sitting up in bed and saying ‘No!’ And when I said that, I felt as if something was coming fast, straight from under the earth, these dark spirits. I know that sounds completely insane. So I sprung out of bed and rushed into every room [mimes shutting windows in a panic]. Then they came, thousands of them, all up against the kitchen window. They were clear, black as night, trying to get into my soul. That’s when I grabbed my acoustic guitar. I thought that if people found my body, I needed to leave a tape. So I just played the songs that became Moon Pix. It was horrifying.”
About two days before Marshall's nightmare, she had received a call from a friend who had challenged her to record something new. "He was like, 'Dude, what are you doing? You're fucking up. You could be really doing something, and you're just not putting anything in the universe, you're just a loser,'" Marshall recalled, in a 2012 interview with Caroline McCloskey of The Fader. "I was so pissed off." After the nightmare, Marshall went to New York City unsuccessfully seeking help, which included talking to priests. The afternoon that Marshall returned from New York, she received a call that her friend had died. Later that night, she heard that another friend of hers had died the same day. "So that's when I woke up," Marshall recalled. "I was like, you know what? What am I doing?" With the cassette of the songs recorded the night of her episode still in her possession, Marshall decided to fax Turner and White, whose band the Dirty Three she had played shows with, and asked if they wanted to record. She asked her record label, Matador, for money to travel to Australia, and spent three months there "hanging out and having a great time" until being told by White that Turner would be leaving Australia in two days, at which point they entered the studio to record the album.
"Stepping into Australia was stepping into something more positive and triumphant as a young woman," Marshall explained in a 2018 Guardian article. "I was, on purpose, choosing a path out of solitude. I found joy I had never felt; some part of the freedom I got there."
According to Marshall, some of Moon Pix was also inspired by two months she spent alone in South Africa, Mozambique and Tanzania, an experience that she said "dented" her. "Cross Bones Style" was written about two children she met in Africa who slept in trees at night after their parents were killed.
The song "Colors and the Kids" was written in the studio, and the lyric "Yellow hair, you are such a funny bear" refers to several people, including Marshall's nephew, a former bandmate, and American singer/songwriter Will Oldham, with whom Marshall drank in Australia, and who she says reminded her of the South.