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") opened a new chapter in the history of classical music of Azerbaijan. The ballet’s confections contained influence from Soviet-
Armenian composer
Aram Khachaturian. 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. During his teaching career at the
Azerbaijan State Conservatoire, Garayev tutored a number of prominent Azerbaijani musicians and composers, including
Galib Mammadov,
Arif Malikov,
Khayyam Mirzazade and among others. Garayev's son,
Faraj (born 1943), also became his student and went on to compose single-act ballets such as
Shadows of Qobustan ("Qobustanın kölgələri") and
Kaleidoscope, and later led the musical
avant-garde movement in Azerbaijan. During the
Cold War in June 1961, Garayev and
Tikhon Khrennikov were the only two Soviet composers who attended the first International Los Angeles Music Festival held at
UCLA. The festival programmed works by fifteen composers from around the world, including
Arnold Schoenberg and
Igor Stravinsky. On June 11,
Franz Waxman conducted the Festival Symphony Orchestra with a suite from Garayev's
Path of Thunder. In 1962 Garayev became a member of the
Supreme Soviet of the USSR and visited the United States, Ethiopia, and Lebanon. In 1972 he visited Poland. ==Later life==