The Federal Supreme court in Abu Dhabi jailed two others for 15 years, 13 for 10 years, six for three years, and two for five years, the official WAM news agency said.
Seven defendants were acquitted.
The 41 defendants were accused of seeking to overthrow the government to set up an Islamic State group-style caliphate in the UAE.
Two of those jailed for life were tried in absentia.
According to the Khaleej Times newspaper, the defendants were convicted of “plotting to carry out terrorist operations throughout the country.”
They were also found guilty of “endangering the safety and security of the country and the lives of individuals, including the leadership and its symbols with the intention to cause damage to state and private infrastructure.”
Other charges included “possessing firearms and ammunition with the intention of committing attacks,” as well as contacting and raising funds for the Islamic State group and Al-Qaeda’s Syria affiliate Al-Nusra Front, Khaleej Times reported on its website.
Authorities had reported their arrest on August 2 and their trial — which was closed to international media — began on August 24.
The UAE is part of a US-led coalition that has been carrying out air strikes against IS in Syria since September last year.
The wealthy Gulf state has stepped up security since the Arab Spring uprisings of 2011.