Praise be to Allaah.
It is permissible to eat the meat of onagers (“wild donkeys”) and it is haraam to eat the meat of domesticated donkeys. The first is permitted because of the report narrated by al-Bukhaari (5492) and Muslim (1196) from Abu Qataadah (may Allaah be pleased with him) who hunted an onager and brought a piece of it to the Prophet (peace and blessings of Allaah be upon him) and he ate some of it, and he said to his companions: “It is halaal, eat it.”
With regard to domesticated donkeys, their meat was permitted at first, then the Prophet (peace and blessings of Allaah be upon him) declared it to be haraam on the day of Khaybar.
Al-Bukhaari (5520) narrated that Jaabir ibn ‘Abd-Allaah (may Allaah be pleased with him) said: On the day of Khaybar, the Prophet (peace and blessings of Allaah be upon him) forbade the meat of domesticated donkeys, but he granted us a concession allowing us to eat the meat of horses.
Al-Bukhaari (5527) and Muslim (1936) narrated that Abu Tha’labah (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) forbade the meat of domesticated donkeys.
Ibn Qudaamah (may Allaah have mercy on him) said: Most of the scholars believe that the meat of domesticated donkeys is haraam. Ahmad said: Fifteen of the companions of the Prophet (peace and blessings of Allaah be upon him) regarded it as makrooh (in the sense of being haraam). Ibn ‘Abd al-Barr said: There is no difference of opinion among the Muslims scholars today concerning the fact that it is haraam. End quote from al-Mughni (9/324).
And Allaah knows best.