Historians claim that the phrase “Slava Ukrayini!” (Glory to Ukraine!) first appeared in the Black Zaporozhtsi Cavalry Regiment, an armed unit of the UNR  Army, which fought for the independence of Ukraine in 1918-1920.
At that time, Ukrainian partisans greeted each other with this slogan, but the response was different – “Kozakam Slava!” (Glory to the Kozaks!) During the Hetmanate period of Hetman Pavlo Skoropadsky, a similar greeting was used – “Slava Ukrayini!” “Hetmanu Slava!” (Glory to Ukraine! Glory to the Hetman!)
Thus, “Slava Ukrayini!” remained as a greeting, but there were several responses. So, why and how did “Heroyam Slava!” (Glory to the Heroes) catch on?
To begin with, the greeting and the response did not appear at the same time. According to historian Volodymyr Vyatrovych, “Slava Ukrayini!” became part of the Ukrainian lexicon in 1920, which, incidentally, was long before the OUN and UPA movements started (and before Hitler and the Nazis came to power). In his monumental book Kholodny Yar, Yuriy Gorlis-Gorsky writes that he heard this phrase from several insurgents, who fought in the Kholodny Yar Ukrainian partisan movement (1918-1923). They routinely greeted each other with the phrase “Slava Ukrayini!”, and the response had to be “Ukrayini Slava!” (Glory to Ukraine!).
On September 24, 1920, the Kholodny Yar otamans* gathered in Medvedivka, Cherkasy Oblast, the region known for the famed Koliyivshchyna rebellion. It was attended by commanders of the Steppe Division and leaders of armed groups from other regions. At this council, otaman Kost Pestushko was elected hetman of all the Kholodny Yar troops. The soldiers of the Steppe Division, numbering between 12,000 and 18,000 men, greeted each other with “Slava Ukrayini!” “Ukrayini Slava!”
In the 1930s, members of OUN and UPA started using this slogan, replacing all former responses with “Heroyam Slava!” (Glory to the Heroes!). It was a mark of deep respect for all the men and women who had laid down their lives for their country. The partisans thus honoured the memory of all the brave soldiers and passed it on to future generations.
“Slava Ukrayini!” became very popular in the 1940s and 1950s when the OUN/UPA partisan movement swept across most of Ukraine.
It’s important to note that this greeting was something more than just a slogan. It was an expression of hope for a better future.
Then, during the oppressive years of the communist regime, “Slava Ukrayini!” was forbidden and went underground, as did another saying – Бережіть ліси, вони намще знадобляться! (Protect our forests. We’ll need them!).
During the Revolution of Dignity, “Slava Ukrayini!” “Heroyam Slava!” finally became the symbol of a truly independent Ukraine.
Слава Україні ! Героям Слава !
*Otaman, hetman – Kozak leader
 UNR – The Ukrainian People’s/National Republic was declared on January 25, 1918. During its short existence, the republic went through several political transformations from a socialist-leaning republic headed by the Central Council and a General Secretariat to a national republic led by the Directorate and Symon Petliura. Between April and December 1918, the UNR was seized by the Hetmanate of Pavlo Skoropadsky. The March 18, 1921 Treaty of Riga between Poland, Soviet Russia, and Soviet Ukraine ended the Polish-Soviet war, sealed the fate of the Ukrainian People’s Republic, and established the Soviet-Polish borders that remained in force until WW2.
 The Hetmanate was an anti-socialist government that existed on most of the territory of Ukraine (except for Western Ukraine) from April 29, 1918 until December 1918. It was installed after the socialist-leaning UNR (Ukrainian People’s Republic) was dispersed on April 28, 1918. The Hetman of Ukraine Pavlo Skoropadsky outlawed all socialist-oriented political parties, relying on German and Austro-Hungarian support. The Hetmanate collapsed in December 1918, when Skoropadsky was deposed and the Ukrainian People’s Republic returned to power in the form of the Directorate (Symon Petliura).
 Kholodny Yar (1918-1924) – The Cold Ravine was the operations base for pro-UNR partisan detachments that fought against the Red Army consistently until 1922, still attacking them sporadically in 1925. The UNR forces were commanded by a former teacher from the village of Melnyky, otaman Chuchupaka; they operated in the Cherkasy–Chyhyryn–Znamianka–Dnipro River sector. Among the several thousand partisans, there were soldiers from Kuban and Kyiv regions, Halychyna (Western Ukraine), and local peasants.
 Koliyivshchyna (1768-1769) was an important Haidamaka rebellion that broke out in Right-bank Ukraine in May 1768; it was the peasants’ answer to social and national-religious oppression of Ukrainians by the Polish administration and nobility. The uprising resulted in mass killing of Polish noblement, Jews, Uniates and Catholics in Podillya and Volyn. The uprising was crushed by Russian troops, aided by the Polish army. The Kozak leaders, Ivan Honta was tortured to death, while Maksym Zalizniak was exiled to Siberia. Taras Shevchenko based his epic poem Haidamaky on this rebellion.
 OUN (Organization of Ukrainian Nationalists) was a political organization created in 1929 by Yevhen Konovalets and other leaders, operating mostly in Western Ukraine. OUN members sought to infiltrate political parties, universities and other political structures and institutions. OUN’s strategy to achieve Ukrainian independence included guerilla warfare and violent attacks against foreign and domestic enemies, particularly Poland and Russia. OUN’s goals were to protect the Ukrainian population from repression, drive out the occupying powers, and set up a government representing all regions and Ukrainian social groups.
 UPA (Ukrainian Insurgent Army) was a nationalist partisan formation that engaged in a series of guerrilla conflicts during WW2 against Nazi Germany, the Soviet Union, and Poland. The insurgent army arose out of separate militant formations of the OUN, other militant national-patriotic formations, and mobilization of local population. The political leadership belonged to the Stepan Bandera faction. Stepan Bandera (1909-1959) was murdered in Munich by KGB assassin Bohdan Stashynsky, who acted on the orders of Soviet KGB head Aleksandr Shelepin and Soviet premier Nikita Khrushchev.
Source: Encyclopedia of Ukraine