Another man was given 10 years for the same offence.
The sentences were handed out at the State Security Circuit at the Federal Supreme Court on Monday, state news agency WAM reported.
The court found the men had “intent to ridicule and damage the reputation and prestige of the state symbols”, WAM said.
The verdicts were issued in the presence of the first defendant, identified as H.A.M.A, while the other four, identified as J.H.A, H.K.A., R.A.A. and A.M.A., were sentenced in absentia.
The court heard the pleadings of the first accused and his defence lawyers.
Each of the defendants was also fined Dhs1 million.
The court did not state what nationality the men were nor if it is known where the four at-large individuals are.
H.A.M.A appeared before the court in the presence of relatives, the media and members of civil society organisations.
Meanwhile, the court handed down a three-year imprisonment to an Emirati, identified as A.S.A., on the charge of abusing state symbols at his workplace.