French troops had quickly ended the coup and freed the captive Comoros president unharmed and they arrested the mercenaries.
The co-defendants in the trail got lesser sentences, but four of these will not be punished.
Bob Denard was found guilty of "belonging to a gang who conspired to commit a crime".
As a mercenary he had previously led revolts in Angola, the Democratic Republic of Congo, Nigeria and Yemen.
Prosecutors claimed he took part in an operation in September 1995 in which the then President of the Comoros Islands, Said Mohamed Djohar, was taken as a hostage.
In spite of Bob Denard's illness, a court medical report said that he should be tried in his absence, although his lawyer argued he had been made a scapegoat by the French state.
It was alleged that the attempted coup had the backing of the French secret services.
Bob Denard has been tried before over his involvement in a previous coup in the Comoros Islands in 1989, during which another president was assassinated however, at his trial 10 years later he was acquitted of the murder.