Danger Mouse, who is best known for being one half of Gnarls Barkley, produced this song along with the rest of the album. Beck and Danger Mouse knew each other casually before making the record and some of Beck's former musicians have also played with Gnarls Barkley. Beck told Rolling Stone magazine that they were both surprised at how naturally they worked together. "It felt like we could have been making our fourth record together. It did help that we share a lot of musical references. We spent the first week just talking about different records. His knowledge is pretty deep, especially with some of the obscure late-'60s, early-'70s rock."
Danger Mouse insisted that Beck keep his original off-the-cuff lyrics that he'd scribbled for this song. The LA musician had written them to fill out the melody until he could come up with better ones. Beck admitted to the Metro newspaper June 29, 2008: "Probably most of the words on my record are scratch lyrics. When it's two in the morning you're beyond exhausted and you just throw something down."
Beck explained to Renee Montagne on NPR's Morning Edition how he writes his songs. Said Beck: "The way a lot of my songs are written - I write the music first, and I record it, and then with a song like 'Modern Guilt,' I just get on the microphone and I write something really quick, sort of off the top of my head so I can remember the melody. And what happens a lot of times is that what I initially sing on there ends up being on the record. A lot of these things, I don't really get to spend too much time figuring out what it is."
Shortly before recording Modern Guilt, Beck suffered a spinal injury. "I was in bad shape," he told Rolling Stone. "There were a number of years where I couldn't pick up my guitar."
"Making that record," Beck added regarding Modern Guilt, "was like doing it with both hands tied behind your back. It hurt to sing. I'm whispering through half of those vocals."