Is it Haram to get married to just get a green card?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The marriage is legislated for many benefits. Among these benefits are to establish and maintain the progeny of human beings, to have tranquility and peace of mind, and to spread love and mercy among couples and families.
Allah Says (what means):
• {And Allah has made for you from yourselves mates and has made for you from your mates sons and grandchildren and has provided for you from the good things. Then in falsehood do they believe and in the favor of Allah they disbelieve?} [Quran 16: 72]
• {And among His Signs is this, that He created for you wives from among yourselves, that you may find repose in them, and He has put between you affection and mercy. Verily, in that are indeed signs for a people who reflect.} [Quran 30: 21]
People marry for many reasons though all of them find comfort of the heart and make up a family. The Prophet indicated the main reasons for which a woman is married. He said: “A woman is married for four things: for her wealth, her family lineage, her beauty and her religion. So choose the religious one, you will prosper.” [Al-Bukhari and Muslim]
Nowadays some people who marry aspire to get nationality through the marriage, or to get a job, or to settle in a country. If one stipulates such a condition in his marriage contract, or makes it clear to the wife that he will divorce her after achieving his goal, then such marriage is invalid since it is a Mut'ah (temporary) marriage.
If one does not stipulate such a condition in his marriage contract and does not make it clear to his wife, then the marriage is valid. But the purpose for which it is established is not satisfying, especially if there is no dire need to live in a non-Muslim country.
For more benefit, please refer to Fataawa 81464 and 81642.
Allah knows best.
You can search for fatwa through many choices