"Julia" was written for John's mother, Julia Lennon (1914–1958), who was knocked down and killed by a car driven by a drunk off-duty police officer when John was 17 years old. Julia Lennon had encouraged her son's interest in music and bought him his first guitar. But after she split with John's father, John was taken in by his aunt, Mimi, and Julia started a new family with another man; though she lived just a few miles from John, Julia did not spend much time with him for a number of years. Their relationship began to improve as he neared adolescence, though, and in the words of his half-sister, Julia Baird: "As he grew older, John would stay with us more often. He and Daddy got along well enough, and in the evenings when our daddy, a headwaiter, was at work, John and Mummy would sit together and listen to records. She was an Elvis Presley fan from the word go, and she and John would jive around the room to Heartbreak Hotel and other great Elvis songs. John inherited his love of music from her, and she encouraged him to start with piano and banjo, making him play a tune again and again until he got it right."
"I lost her twice," Lennon said. "Once as a five-year-old when I was moved in with my auntie. And once again when she actually physically died."
The song was also written for his future wife Yoko Ono, whose first name, which literally means "child of the sea" in Japanese, is echoed in the lyric "Oceanchild, calls me." Towards the end of his life, he often called Yoko "Mother."
The line "Half of what I say is meaningless, but I say it just to reach you" was a slight alteration from Kahlil Gibran's "Sand and Foam" (1926) in which the original verse reads, "Half of what I say is meaningless, but I say it so that the other half may reach you". Lennon also adapted the lines "When I cannot sing my heart, I can only speak my mind" from Gibran's "When life does not find a singer to sing her heart she produces a philosopher to speak her mind".
The song is in the key of D and begins with a I-vi7-v7-v9-VI7 progression from D chord note A on "Jul..." to Bm7 chor' on "...ia" to Am7 chord on "Jul..." to Am9 chord on "...ia" to B7 chord on "ocean child." A feature is that the 9th degree in the minor 9th chord Bm9 (1-♭3-5-♭7–9) is heard in the melody as well as the guitar chord (at 0.20secs on "Julia, Ju-li-a).