It sounds rather cartoonishly evil
Yes, it was a real slogan. The origin of it is tied in with the Spanish Foreign Legion, which was founded in 1920 to provide a similar unit to the French Foreign Legion, allowing foreigners to serve Spain, but in reality it never had the same pull and its manpower was overwhelmingly more Spanish - as high as 90 percent - than the FFL ever was French. Even so it served its purpose well by removing conscripts - and potential unpopularity from their commitment - from combat, and instead expending foreign lives, or at worst those of volunteers who sought out the duty.
The SFL, which was utilized to fight and defend Spain's North African possessions, quickly established a fairly nasty reputation for being brutal in their behavior in combat, as well as coming to be seen as a bastion of far-right thought within the officer corps, which would, in 1936, see it be one of the first units to align itself with the rebels.
They utterly embraced that image though, and Death became a major motif of their identity. They called themselves the "Betrothed of Death", adopted as a battle cry "Legionaries, to fight; Legionaries, to die!", and took as their motto "Viva la Muerte!", which was coined by José Millán Astray, and which recognized that role which they were intended to serve - not only to fight, but to die instead of Spanish conscripts. This was expanded on in the song of the morbidity of the song of the Legion, which ended:
Death in battle is the greatest honour: One does not die more than once. Death comes without pain and dying is not so terrible as it seems; what is truly terrible is to live like a coward.
It was a recognition of their expendability, and an embrace of it, a symbol that cowardice was far worse a fate than dying. Astray's vision of the Legion's esprit de corps was one which he summed up as "Japanese code of Bushido, fervent Catholicism, and most importantly an overriding belief in honourable death on the battlefield."
In his welcome of new recruits, Astray would paint a bleak picture to the early recruits:
The Legion greets you with joy. You are here to form part of an honourable corps soon to become the foremost of our glorious Infantry. The life which awaits you will be hard and terrible. You may starve. You will certainly suffer the torments of thirst. A pitiless penetrating rain will beat down on you. In summer a fiery sun will burn you to the verge of madness. You will dig trenches, construct camps to the point of exhaustion never knowing when you may expect your next meal. You will receive wounds. Your bones will be broken. But your final destiny is to die that clean death which only the field of battle can offer. The Legion takes you to its heart. Welcome!
And later groups were similarly welcomed, reminded by him that "You shall always fight in the vanguard, death shall become our constant companion. Many of you will die, perhaps all." It was a promise kept, as the SFL suffered fairly high casualties, with nearly 40 percent killed or wounded during the Rif War. The veritable death cult that shaped its culture was a source of pride, and one they lived up to, known as the toughest force in the Spanish Army, and utterly fearless. Astray in particular would embody the ethos he created, suffering several serious wounds, and eventually losing an eye and an arm.
So anyways, the point is that the slogan originated as an embrace of the likely fate of those who joined the Spanish Foreign Legion, a culture which Astray worked to cultivate where an honorable death in battle was something to be welcomed. As already noted, the Legion would come to be seen as the center of the far-right factions in the Spanish military, and were a centerpiece of the uprising in 1936, Astray becoming a key figure in the rebel forces, and other major figures served their time there, most importantly Franco himself, who had served as Astray's second in command. The mottos of the Legion, including "Long Live Death" thus carried with them as well as the broader ethos, and they made use of them. Thomas describes a speech that Astray gave on Sept. 15, 1936, the Feast of Assumption, thus:
‘We have no fear of them,’ he shouted, ‘let them come and see what we are capable of under this flag.’ A voice was heard crying ‘¡Viva Millán Astray!’ ‘What’s that?’ cried the general. ‘No vivas for me! But let all shout with me “¡Viva la muerte!”’ (Long live death!) The crowd echoed this famous slogan. He added, ‘Now let the reds come! Death to them all!'
Not everyone in the Nationalist camp was a fan though, to be sure, the rebel side side being composed of an at times fairly awkward amalgam of nationalists, fascists, monarchists, catholics, and so on, not everyone liked the rhetoric of death. One incident worth noting where this came to a slight head was at an event held on 'Day of the Race' at the University of Salamanca, a number of luminaries were present, including Astray. Speeches were given by a number of figures present. At one point an audience member yelled out "¡Viva la muerte!", followed by Astray going through a series of call-and-response slogans.
"Spain!"
"One!"
"Spain!"
"Great!"
"Spain!"
"Free!"
This was to be followed by Miguel de Unamuno, the rector of the university, who had supported the initial uprising but quickly was becoming disillusioned by the behavior and rhetoric of some in the Nationalist camp, and had a particular dislike for Astray, which quickly showed in his speech with a very direct call out:
Just now I heard a necrophilistic and senseless cry: ‘Long live death’. And I, who have spent my life shaping paradoxes which have aroused the uncomprehending anger of others, I must tell you, as an expert authority, that this outlandish paradox is repellent to me. General Millán Astray is a cripple. Let it be said without any slighting undertone. He is a war invalid. So was Cervantes. Unfortunately there are all too many cripples in Spain just now. And soon there will be even more of them, if God does not come to our aid. It pains me to think that General Millán Astray should dictate the pattern of mass psychology. A cripple who lacks the spiritual greatness of a Cervantes is wont to seek ominous relief in causing mutilation around him.
Astray interrupted the speech at this point to shout the slogan out a few times, and was joined in by members of the Falange as well. Members of the Legion even looked poised to rush the stage and guns were leveled, before Mrs. Franco came between them to escort Unamuno off stage, followed by cries of "traitor" from the crowd. He retired from public life almost immediately, and would die within a few months, but the incident nevertheless well illustrated the quickly widening split between the militants of the rebel faction, and those who, at least initially, had given it some level of intellectual veneer.
Now, to be sure, it was a rhetorical device, not a truly deep credo (well, it certainly was the latter for Astray, who definitely believed it). Although my readings on post-war Spain are scanter, to my knowledge, the phrase didn't retain much place within the Francoist government, even if the Legion continued to shout it with pride a bit longer. Even during the war its popularity waned quickly. It was a martial phrase, and well suited to the tenor of the uprising, especially in their early days, but less so as the rebels sought legitimacy. Astray was an effective enough internal propagandist, but also an extreme one, and seen as deranged even by some within the fold, especially the Catholics, and it is plain enough why, while appealing within the veteran soldiery, the phrase wasn't used too widely beyond.
Sources
Alvarez, José E.. The Betrothed of Death: The Spanish Foreign Legion During the Rif Rebellion, 1920-1927: The Spanish Foreign Legion During the Rif Rebellion, 1920-1927. ABC-CLIO, 2001.
Keene, Judith. Fighting for Franco: International Volunteers in Nationalist Spain during the Spanish Civil War. Hambledon Continuum, 2004.
Othen, Christopher. Franco's International Brigades: Foreign Volunteers and Fascist Dictators in the Spanish Civil War. Reportage Press, 2008.
Preston, Paul. The Spanish Civil War: Reaction, Revolution & Revenge. HarperCollins Publishers, 2006.
Thomas, Hugh. The Spanish Civil War. Penguin, 2013.