Ben Tzur, Greenwood and Radiohead producer Nigel Godrich set up a recording studio in Mehrangarh Fort in Rajasthan, India. They were joined by a group they named the Rajasthan Express, incorporating musicians from three musical traditions: the Qawwali, Sufi musicians from Southeast Asia; Muslim Roma; and a brass section who had played in weddings and parades. Ben Tzur wrote the songs, with Greenwood contributing guitar, bass, keyboards, ondes Martenot and programming. Greenwood produced the album and Godrich engineered.
According to Pitchfork, Junun incorporates "Bollywood-style brass exuberance, the devotional Qawwali music of Sufi Islam, and bowed-string instruments associated with the Manganiar community". Whereas western music is based on harmonies and chord progressions, Greenwood wanted to use chords sparingly, and instead write using North Indian ragas. He said: "There's no major or minor in Indian music, which is very peculiar for someone who's used to playing with Radiohead and coming up with chord sequences ... As soon as you start imposing chords on this kind of music, you pin it down and force melodies onto it to have some sort of harmonic language that they don't really have, [Indian] music is more ambiguous than that." He likened the music to the work of James Brown, describing it as "ecstatic".
Greenwood and Godrich said they wanted to avoid the "obsession" with high fidelity in recording world music, and instead hoped to capture the "dirt" and "roughness" of music in India. Greenwood said: "When lots of Westerners go to India they make music with lots of respect, but sometimes it feels a bit like there's too much respect. People can be too wary, too wary to make anything that captures the real roughness of some of this music, especially the way the brass bands play when they're following processions and weddings down backstreets and the like." To capture less polished recordings, some vocals were recorded with the singers using handheld microphones. The lyrics are in Hebrew, Hindi, and Urdu. Some singers sang phonetically in languages they did not know. All the reverb is natural and was recorded using a large space beneath the fort.
The recording is the subject of a documentary of the same name by Paul Thomas Anderson, released in October 2015. Greenwood had previously composed soundtracks for several Anderson films.