Masjid Al-Suqya is named after its location near the Well of Al-Suqya, where the Prophet Muhammad (peace be upon him) drank water and performed ablution before the Battle of Badr in 2 AH (624 CE). He prayed two units of prayer near the well, asking Allah to bless Madinah and help his army.
The well was known for its sweet and pure water. It later became known as the "Well of the Foreigners" after being restored by a local person in 778 AH (1376 CE). It fell into ruin again but was rebuilt by Khawaji Badr al-Din ibn Alayba in 886 AH (1481 CE).
The mosque was originally built during the time of Caliph Al-Walid ibn Abd al-Malik, under the leadership of Omar ibn Abd al-Aziz, who was the governor of Madinah from 87–93 AH (706–712 CE).
It was later renovated during the Saudi era, especially in 2002 CE (1423 AH) under King Fahd bin Abdulaziz. Recently, it was restored again as part of the Prince Mohammed bin Salman Project to develop historic mosques, in line with Saudi Vision 2030, using high-quality technical standards to preserve Islamic heritage.