Brian Wilson was inspired to write the song during his first time taking the psychedelic drug LSD. He had been given the drug by friend Loren Schwartz, who later said that Wilson's dosage was 125 micrograms of "pure Owsley". In a 2007 interview, Wilson explained that he went to his piano and "was thinking about the music from cowboy movies. And I sat down and started playing it, bum-buhdeeda, bum-buhdeeda. I did that for about an hour. I got these chords going. Then I got this melody, it came pretty fast after that." He said that "California Girls" was intended to encapsulate the feel of the Drifters' version of "On Broadway". and on other occasions, said that the shuffle beat in the song was influenced by Bach's "Jesu, Joy of Man's Desiring".