Bismillaahir Rahmaanir Raheem
Sayyiduna Sa’id ibn Zayd (Allah be pleased with him) narrates that he heard the Messenger of Allah (Allah bless him & give him peace) say: “Mushroom is from the al-Mann, and its water is a cure for the eyes.” (Sahih al-Bukhari, no. 5381)
The great Hadith master (hafidh), Imam Ibn Hajar al-Asqalani (Allah have mercy on him) gives two interpretations for the Messenger of Allah’s (Allah bless him & give him peace) statement “Mushroom is from the al-Mann” in his monumental Fath al-Bari:
1) It refers to the al-Mann and Salwa that was sent down on the people of Sayyiduna Musa (peace be upon him) Banu Isra’il as a bounty from Allah Most High.
2) al-Mann is from the root word imtinan, which means blessings, favour and graciousness, meaning mushroom is a gift from Allah Most High, in that it grows after rain without having to do any farming. (See: Fath al-Bari, 10/202)
Thus, consuming mushroom is Halal. However, certain species of wild mushroom are poisonous for human consumption; hence one should exercise caution and avoid consuming such mushrooms.
And Allah knows best