Praise be to Allah.
Your efforts to build a mosque come under the heading of righteous deeds. Allah, may He be exalted, says (interpretation of the meaning):
“The Mosques of Allah shall be maintained only by those who believe in Allah and the Last Day; perform As-Salat (Iqamat-as-Salat), and give Zakat and fear none but Allah. It is they who are expected to be on true guidance”
Ibn Maajah (738) narrated from Jaabir ibn ‘Abdullah (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever builds a mosque for the sake of Allah, like a sparrow’s nest or even smaller, Allaah will build for him a house in Paradise.”
Classed as saheeh by al-Albaani.
What is meant in the hadeeth is to encourage giving even the smallest amount to build a mosque.
The one who participates in or contributes to building a mosque will have a reward commensurate with his contribution. For more information please see the answer to question no. 146564.
But the efforts to achieve these good deeds must be in accordance with Islamic teachings, because Allah is good and does not accept anything but that which is good.
In the case of this method of yours, in which some people give contributions to building the mosque in the hope of winning a free ‘Umrah, the one who joins in will either be a winner, if he wins the ‘Umrah trip, or he will be a loser if someone else wins the prize. In fact this comes under the heading of gambling which is forbidden in Islam.
Allah, may He be glorified and exalted, says (interpretation of the meaning):
“O you who believe! Intoxicants (all kinds of alcoholic drinks), gambling, Al-Ansab, and Al-Azlam (arrows for seeking luck or decision) are an abomination of Shaitans (Satan) handiwork. So avoid (strictly all) that (abomination) in order that you may be successful.
Shaitan (Satan) wants only to excite enmity and hatred between you with intoxicants (alcoholic drinks) and gambling, and hinder you from the remembrance of Allah and from As-Salat (the prayer). So, will you not then abstain?”
Moreover, if the donor is hoping to win this ‘Umrah by means of donating and giving charity, this is a kind of compensation for his charity which goes against the shar‘i definition of charity. The Prophet (blessings and peace of Allah be upon him) forbade the giver to take back his charity or to buy it again, if he finds it being offered for sale, lest that be a kind of going back on it, and in order to put an end to attachment in hearts that are naturally inclined towards stinginess to that which they have given for the sake of Allah. So how about if a person gives his charity hoping for something like that from the outset?
Hence we advise you not to use this method of collecting funds for the mosque, and to limit it to encouraging people to donate on the basis of what Allah has promised of reward in the hereafter to those who spend and give charity, and on the basis of the reports that speak the one who builds a mosque, or participates in building it, for the sake of Allah and seeking reward with Him. It was narrated that ‘Uthmaan ibn ‘Affaan (may Allah be pleased with him) said: I heard the Messenger of Allah (blessings and peace of Allah be upon him) say: “Whoever builds a mosque for the sake of Allah, may He be exalted – Katheer [one of the narrators of the hadeeth] said: I think he said – seeking thereby the Countenance of Allah, Allah will build for him a house in Paradise.”
Narrated by al-Bukhaari, 450; Muslim, 1217.