Alexander was executed. But Lenin was sent abroad. He settled in Germany, before he came back for the Revolution (and, as some people say, to avenge his brother).
First of all, Alexander Ulyanov was a member of a terrorist organization (the terrorist faction of "People’s Will"), planning an assassination of Russian tzar, Alexander III, on the 6th year anniversary (March 1, 1887) of assassination of Alexander II, see here.
The plot was foiled and most plotters were hanged (one, a former military officer, executed by a firing squad). But some were not executed, e.g. Lenin’s older sister Anna, who was even allowed to serve her exile term with her parents’ family and not in Siberia but in Volga region, not far from her hometown. The plot and its aftermath are discussed in great detail in
Philip Pomper. "Lenin's Brother: The Origins of the October Revolution." New York: W. W. Norton & Company, 2010.
By all accounts, Vladimir Ulyanov (aka Lenin), who was only 16 at the time of the plot, did not know about it. Accordingly, he was not charged, let alone executed. (The idea of preemptively arresting/executing family members of “people’s enemies” did not exist at the time. Its time came later, in USSR, in 1920-1930s, see here.)
How much the fate of his older brother influenced Lenin later in his life is debatable. According one story, Lenin's reaction to the failed assassination attempt in 1887 was "We will follow a different route." The only source of this are recollections of Lenin's older sister, Anna. Personally, I doubt authenticity of this story (I can explain why if anybody cares).
Lenin left after himself a long paper trail. I read only a tiny fraction of it and from that did not notice any particular hatred towards Romanov’s family or Tzarist officials. Instead, it is hard to miss his frequent anger against other revolutionaries, especially, social democrats who disagreed with him.
In any case, Lenin was one of the many young people (especially students) in Russia at the time who were infatuated with revolutionary ideas. In 1895 he was among the founders of the League of Struggle for the Emancipation of the Working Class, a predecessor to the Social Democratic Party of Russia (RSDRP). As the result, Lenin was arrested, spent about 1 year in jail and 3 years in exile in Eastern Siberia, see this Wikipedia article:
Deemed only a minor threat to the government, he was exiled to a peasant's hut in Shushenskoye, Minusinsky District, where he was kept under police surveillance.
Remark 1. According to the emergency laws in Russia introduced in the wake of assassination of Alexander II in 1881 and lifted only in 1917 (see here), subversive persons could have been sent, without a trial, to an internal exile, for a period between 1 and 5 years. The SD party of Russia was subversive but not terrorist, so the sentence (3 years of exile to Siberia) was in line with the existing laws. (Julius Martov, another founder, and future Lenin’s nemesis, received a similar term.) There was simply no basis for execution of either one of them. (Russian Empire, for all its many faults, tried to be a country of laws.)
Remark 2. Lenin was not "sent abroad:" Siberia was not abroad but a part of the Russian Empire. After completing his term in Siberia, he spent half a year in Pskov (a city in the European part of Russia), then applied for and received a passport for international travel. According to Pomper's book, Lenin successfully fooled the authorities by his good behavior while in Siberia and Pskov, so they did not see a reason to deny him the passport. After that Lenin went to Europe (Switzerland, Germany, England, Switzerland again, etc.).
One more thing: Among three main revolutionary movements in Russia during 1890-1917, it were the Party of Socialist Revolutionaries (PSR) and various anarchist groups, that preached and practiced terror. (PSR was an ideological successor of "People’s Will.") Social Democrats, as a matter of doctrine, condemned terror as a wrong tool (of course, not for a moral reason). Practice was, of course, more complicated and Lenin stood apart here, as more willing than the rest to “bend the doctrine.” This (and, in general, pre revolutionary terror in Russia, its normalization in public eye and influence on Russian revolution and Civil War), is discussed in great detail in books by Anna Geifman:
 "Thou Shalt Kill: Revolutionary Terrorism in Russia, 1894-1917." Princeton, NJ: Princeton University Press, 1993.
 "Death Orders: The Vanguard of Modern Terrorism in Revolutionary Russia." Praeger Security International, 2010.
In theory, the [Social Democratic] party disallowed expropriations along with other forms of terrorism, incompatible, the SD leaders insisted, with the Marxist canons. “Using bombs for individual terrorist acts was out of the question since the party rejected individual terror”—so ran a typical statement affirming the RSDRP’s,"
see , page 62.
Accordingly, in eyes of tzarist officials, SD’s were the lesser evil of the three. Who would have objected at the time?
(Geifman has at length discussion of, frequently violent, "expropriations" and other forms of terror practiced by Social Democrats after 1905, see , Chapter 3 "Terror and Social Democrats.")
Lastly, regarding Mark Olsen’s question, I will answer it with a rhetorical question of my own: Who would want to live in an anti-utopia where people are prosecuted on the basis of crimes (even most horrible ones) they might commit 20 years later?