The attack took place during prayers for the Islamic festival of Eid al-Adha, France 24 reported.
Goita has since been taken from the scene, according to the AFP journalist, who said it was not immediately clear whether he had been wounded.
Religious Affairs Minister Mamadou Kone told AFP that a man had "tried to kill the president with a knife" but was apprehended.
Latus Toure, the director of the Great Mosque, said an attacker had lunged for the president but wounded someone else.
AFP was not immediately able to confirm the accounts.
Mali has been struggling to contain an insurgency that first emerged in the north of the country in 2012, and has since spread to Burkina Faso, Mali, and Niger.
Thousands of soldiers and civilians have been killed and hundreds of thousands have fled their homes.
The conflict has also been mirrored by political instability in the capital.
Colonel Goita led a coup last August, ousting elected President Ibrahim Boubacar Keita after weeks of mass protests over corruption and the long-running conflict.
In May, he ousted a transitional government that had been entrusted with the task of leading the country back to civilian rule in February 2022.
He was then named transitional president but has pledged to keep to the goal of returning to civilian government.
RHM/PR
Your Comment