Foundi Toihir Said Maulana, the Mufti or highest spiritual leader of the Comoros, announced the president's death on state radio.
Comoros radio and television have been broadcasting solemn music and soldiers are guarding key buildings and locations.
Mr Taki's body is reported to have been taken to his home village, where crowds have been gathering.
The succession and details of the burial are due to be announced later.
Presidential aides were quoted as saying Mr Taki died at the presidential palace in the capital, Moroni, only hours after returning from a visit to Turkey and Spain.
Mr Taki, 62, became president in March 1996, succeeding Said Mohamed Djohar, who had been ousted from power six months earlier in a coup led by the French mercenary, Bob Denard.
Last year, Mr Taki was involved in efforts to resolve the secession of the island of Anjouan which has been seeking to return to French rule.
According to the Comoros constitution, the President of the High Council of the Republic - a position currently held by Tadjiddine Ben Said Massonde - assumes presidential duties in case of the president's death.
The BBC is not responsible for the content of external internet sites.
Dam builders charged in bribery scandal
Burundi camps 'too dire' to help
Sudan power struggle denied
Animal airlift planned for Congo
Spy allegations bug South Africa
Senate leader's dismissal 'a good omen'
Tatchell calls for rights probe into Mugabe
Zimbabwe constitution: Just a bit of paper?
South African gays take centre stage
Nigeria's ruling party's convention
UN to return to Burundi
Bissau military hold fire
Nile basin agreement on water cooperation
Congo Brazzaville defends peace initiative
African Media Watch
Liberia names new army chief