The attacks, known as the Arab Sharkas case, led to the death of two military officers.
The condemned were charged with planning terrorist operations, shooting at security forces and attacking military facilities. The ruling has been approved by Egypt's grand mufti, a necessary procedure in Egyptian law.
This is the first trial against the Sinai-based jihadi group, which claims to support the Islamic State (IS), the Sunni radical group operating in Syria and Iraq, Xinhua reported citing state-run media Ahram Online.
Terrorist attacks have been on the rise since the ousting of former Islamist president Mohamed Morsi by the army last July, and the massive security crackdown on his supporters left about 1,000 dead while thousands were arrested.
The attacks targeted security men and their premises in the restive Sinai Peninsula and then extended to hit the capital and provinces across the country.
A recent official report said the toll from such attacks has reached nearly 500, most of whom were soldiers and policemen. The Al Qaeda-inspired Ansar Bayt al-Maqdis group has claimed responsibility for most of the attacks.