Apart from the 18 dead, 131 people were wounded, according to the National Investigation Agency (NIA)
Yasin Bhatkal, his brother Riyaz -- alleged co-founders of the Indian Mujahideen -- and three associates were found guilty of the blasts in February 2013, when two bombs strapped to bicycles exploded in a crowded marketplace in the southern city of Hyderabad.
Riyaz, who allegedly orchestrated the explosions, is on the run and remains on the nation's most-wanted list while the other four were in court.
Apart from the 18 dead, 131 people were wounded, according to the National Investigation Agency (NIA), which carried out a probe into the case.
"All five, who were charged with murder, treason, terrorist act, have been awarded the death sentence," a lawyer involved in the case told reporters.
"The judge said that after going through the entire record... that this case especially, on facts and circumstances, falls under the category of rarest of rare."
The Supreme Court says capital punishment should only be carried out in "the rarest of rare" cases in India, among a dwindling group of nations that still have the death penalty.
The lawyer said all five would appeal the verdict, which was passed by a special NIA court in Hyderabad after examining 157 witnesses.
The hearing was closed to the media.
Yasin Bhatkal, once India's most wanted man, was arrested in the eastern state of Bihar in August 2013, on the border with Nepal.
The banned Indian Mujahideen came to public attention in November 2007 following serial blasts in the northern state of Uttar Pradesh.
It has been accused of a string of attacks since then, in Mumbai, Bangalore, New Delhi and Pune among other locations.
The group is thought to be the largest in a network of homegrown Islamic militant groups.
Yasin Bhatkal was named as a co-conspirator over an attack on the German Bakery restaurant in the western city of Pune in 2010 when a bomb in a rucksack under a table exploded and killed 17 people including five foreigners.
The Indian Mujahideen was also linked to bomb attacks on July 2013 at Bodh Gaya, a UNESCO world heritage site that is revered by Buddhists.