Garayev was born into a family of pediatricians, which was famous in Baku. His mother, Sona, was among the first graduates of the Baku-based school of the Russian Music Society. Garayev's younger brother, Mursal, became a surgeon, but died at an early age.
In 1938, at the age of twenty, Garayev composed his first musical piece, a cantata "The Song of the Heart" to the poem by Rasul Rza. It was performed in Moscow's Bolshoi Theater in the presence of Joseph Stalin in the same year. Garayev conducted his cantata during the Decade of Azerbaijani Art festival in the Bolshoi Theater, an event also attended by Stalin. In the same year, Garayev moved to the Moscow State Conservatoire, where he became a student and a good friend of Dmitri Shostakovich.
In 1941 Garayev returned to Baku to teach at Azerbaijan State Philharmonic Society. In 1945, both he and Jovdat Hajiyev wrote the Motherland ("Vətən") opera, for which they were awarded a prestigious Stalin Prize. In 1948, at the age of 30, Garayev was again awarded this prize for his symphonic poem Leyli and Majnun, based on the same-titled famous work of Nizami Ganjavi. Upon the death of Uzeyir Hajibeyov in 1948, Garayev became the Chair of the Union of Composers of Azerbaijan SSR and the rector of the Azerbaijan State Conservatoire. In this latter position, Garayev retained Uzeyir Hajibeyov's traditional emphasis on Azerbaijani folk music in teaching, and also promoted contemporary genres, such as jazz in Azerbaijani music. In 1948 Garayev also became the delegate to the First National USSR Congress of Soviet Composers. In the same year Garayev also headed the Music Department at the Azerbaijan Architecture and Art Institute.
In 1952, under the direction of the choreographer P. A. Gusev, Garayev's Seven Beauties ballet was staged at the Azerbaijani Theater of Opera and Ballet. Based on Nizami Ganjavi's famous poem, Seven Beauties ("Yeddi gözəl") it became the first Azerbaijani ballet and opened a new chapter in the history of classical music of Azerbaijan. Garayev's only other ballet, Path of Thunder ("İldırımlı yollarla"), staged in 1958, was dedicated to racial conflicts in South Africa. In the same year, Garayev also wrote the score for the documentary film A Story About the Oil Workers of the Caspian Sea, directed by Roman Karmen and set at the Oil Rocks.
Garayev suffered from heart disease, which prevented him from attending his own 60th jubilee celebration held in Baku, where he was awarded the title of the Hero of Socialist Labor. Garayev spent the last five years of his life in Moscow, away from the public, although his love for Baku remained strong and was reflected in his writing:
To me, Baku is the most beautiful city in the world. Every morning, when the city wakes whether it be to the sun or the rain and fog, every morning my city sings. Baku is meant for art. It gives me so much pleasure to write about this city no matter if you write music, verse or paint images.
Garayev died on May 13, 1982 in Moscow at the age of 64. His body was flown to Baku and buried at the Alley of Honor.
Garayev has a great and brilliant talent which is highly developed. He is extremely knowledgeable about instrumentation, polyphony and the other components that make up music. He surely has a great future.
Niyazi, Azerbaijani conductor and composer, student of Garayev:
I've been one who has been privileged in being able to reveal the private and mysterious ideas of Gara Garayev to the audience. So I know the excitement the audience feels while listening to Garayev's music. It can't be characterized as either entertainment or relaxation. Rather, it exposes all the fire in one's heart and compels one to act. I'm grateful that I've had the chance to be in touch with his music and to be the first one to interpret most of his works.
I must say that I indeed have been fortunate, not only because I had the chance to meet such a talented musical personality but because I got to know him through his music. This is the only way to get deep inside an artist-through music. Everything trivial and insignificant - the things one pays attention to during mundane, everyday meetings - disappears. Only the essence of a man is left.
There was almost no limit to Garayev's scope of knowledge in all genres of music. In 1963, we traveled together to America. It amazed me how Garayev knew so many things about so many different genres of music. For example, I'd have to admit to being a bit elitist when it comes to jazz. But I couldn't hide my admiration when he demonstrated competency in this field as well. He mentioned several names, compared one tendency in jazz to another and talked about things I had never heard of.
As a rule, Garayev would turn his lessons into a discussion of problems in contemporary music - analysis of techniques, language and styles of music. Garayev hated thoughtless attitudes toward folk music. He made his students learn the inner workings of folk music.
He was very strict with his students. He had an encyclopedic knowledge about almost everything related to problems of life as well as problems of art regardless of whether it was in the field of science, music or literature. He was acquainted with so many intelligent people. You gain so much confidence through belief in your teacher when he is a great Master. We never dared to think of skipping class or of not coming prepared. Our classes were one-on-one with him, but we didn't leave when they were over. We would stay on and listen to what went on with the next student. That's why there were always so many people in Garayev's classes all the time despite how hard it was to enroll with him.