Masjid Jinn, also known as Masjid Haras, is built on the place where the Prophet (ﷺ) drew a line for Abdullah bin Mas’ood (may Allah be pleased with him) who had accompanied him after he had been commanded to recite the Qur’an to the Jinn.
Abdullah bin Mas’ood (may Allah be pleased with him) narrates, “While in Makkah, the Prophet (ﷺ) once said to the Sahabah (may Allah be pleased with them), ‘Whoever wishes to see what the Jinn are all about should come along’. Besides myself no-one else came. When we reached the place in the Ma’la district of Makkah the Prophet (ﷺ) used his foot to draw a circle on the ground. He then instructed me to sit inside the circle. After proceeding a little further, the Prophet (ﷺ) started reciting the Quran. It then happened that Jinn started to arrive in troops as they gathered there. So many came that I could not even see the Prophet (ﷺ) nor hear him. The Prophet (ﷺ) then continued talking with a group of them until Fajr. [Tafseer ibn Kathir]
It has also been narrated by Abdullah bin Mas’ood (may Allah be pleased with him) that the Prophet (ﷺ) said, “A caller from among the jinn came to me, and I went with him and recited Quran to them.” He further narrates that the Prophet (ﷺ) took them and showed them their footsteps and the traces of their fires. They had asked him for provision and he had prayed to Allah (ﷻ) and told them, “You will have every bone over which the name of Allah has been mentioned; when it falls into your hands it will have plenty of meat on it. And all droppings are food for your animals.” Then the Prophet (ﷺ) said, “Do not use them (bones and dung) to clean yourselves after relieving yourselves, for they are the food of your brothers.” [Saheeh Muslim]
Source: Islamic Landmarks