Miriam was the daughter of Amram and a sister of Aaron. The Qur'an describes Mary, the mother of Jesus, as being a daughter of Amram and a sister of Aaron - in the same family relationship as Miriam. Many people, including Aisha, understood Mary and Miriam to be the same person, based on their understanding of the Qur'anic text.
When Christians criticized the verse which calls Mary "sister of Aaron" in the
Qur'an, Muhammad's response was that "people were named after pious persons who lived before them". Islamic scholars concluded that Mary was either called "sister of Aaron" because she was his descendant or she had a brother coincidentally called Aaron. Both these solutions seem to be inventions, because Mary was not known to be a descendant of Aaron and she was not known to have a brother called "Aaron". On the other hand Miriam was well-known to be a sister of Aaron.
Since Mary and Miriam are both pronounced
Miryam in Arabic, it seems probable, that Muhammad, based on the Christian stories he heard,<ref>For example from Waraqa ibn Nawfal.</ref> mixed these two women into one person, when he was making up the Qur'an.