Hezbollah had confirmed one of the men was a member of the group
An Egyptian court has convicted 26 men of planning terrorist attacks on ships and tourist sites.
The 22 men given prison sentences - some with hard labour - were accused of working for the Lebanese Islamist group Hezbollah.
Sami Shihab, a Lebanese citizen who Hezbollah had confirmed was a member, was given a life sentence.
The sentences were issued by the State Security Court in Cairo and cannot be appealed, reports say.
Another four men, who are still on the run, were convicted in absentia.
The sentences on the other defendants ranged from six months to 25 years.
Last year Hezbollah leader Hassan Nasrallah confirmed Shihab was a member of the group and in Egypt to help its Palestinian allies Hamas get weapons across the border into the Gaza Strip.
But Egypt said it was holding the group on suspicion of planning attacks.
Prosecutors said Hezbollah had told the men to collect intelligence from villages along the Egypt-Gaza border, tourist sites and the Suez Canal.
The group had received equipment from Hezbollah, and had also been tasked with spreading Shia ideology in the predominantly Sunni country, the Egyptian government said.
At the start of the trial it was reported that at least one of the accused said he had been tortured while in Egyptian custody.
Hezbollah has said the charges are politically motivated and in revenge for the movement's stance on Egypt's support for the Israeli blockade of Gaza.
Hezbollah supports Hamas - the Islamic movement which controls the coastal enclave - and has strongly criticised Egypt for not opening its border with Gaza to relieve the Israeli-imposed blockade on the territory.