Gayoom was taken into custody in February over allegations of attempting to overthrow the government of President Abdulla Yameen.
Court officials said he was found guilty after he failed to hand over his mobile phone to the police for investigations.
The Maldives, an archipelago in the Indian Ocean, has been in the midst of a political crisis since February, when the Supreme Court ordered the release of former president Mohamed Nasheed and eight other opposition politicians.
Nasheed was serving a 13-year jail term for illegally ordering the arrest of a judge.
Chief Justice Abdulla Saeed and Justice Ali Hameed, who issued the February court decision, were also sentenced for obstructing justice.
They were handed prison terms of one year, seven months and six days.
Amnesty International in a statement condemned the sentences.
“These convictions are politically motivated, and the product of trials that did not meet international standards, they must be quashed immediately,’’ Amnesty noted.