Ibn Masud (may Allah be pleased with him) said that
"The Messenger of Allah (pbuh) cursed the man who marries a women after her divorce solely to permit her first husband.” [Tirmidhi]
However, this ruling comes in accordance with the opinion of all men of profound knowledge like Umar Ibn Al-Khattab, Uthman Ibn Affan, Ali Ibn Abi Talib and the jurists of the successors. It is reported also by Imam Ahmad in his Musnad and An-Nasai in his Sunan with sahih transmission.
Ibn Abbas (may Allah be pleased with him) said that the Messenger of Allah (pbuh) was asked about the ruling of the one who marries solely to permit the first husband to return to his divorced wife, whereupon he said,
"No (it is not a legal marriage), the legal marriage should be founded on wish and desire. No marriage is permitted which is based on deception or contradiction to Allah's Book. Satisfaction of sexual desires is a condition for legal marriage.” [Ibn Majah]
Uqbah Ibn Amr said that the Messenger of Allah (pbuh) once asked, "Would I tell you about the hired billy goat?". "Yes: O Messenger of Allah!" the people said. He (pbuh) explained,
"It is the one who marries solely to permit the first husband to return to his divorced wife. Verily, Allah Most High cursed this one and the former husband as well.” [Majma al Zawaid and Ibn Majah]
Once a man said to Ibn Umar (may Allah be pleased with them) "I have married a woman with the intention of permitting her first husband to remarry her. However, I have done so without the knowledge of the previous husband and he did not command me to do this. Is there any wrong?" Ibn Umar (may Allah be pleased with them both) replied, "Oh, it is not legal. Permissible marriage should be based on complete desire, if you wish, you could hold her and if you wish you could divorce her. In the lifetime of the Prophet (pbuh), we used to consider the like of your marriage as illicit sexual relation."
Moreover, there are many narrations and reports that condemn the act of marring a woman solely to return to her first husband. The following are some of these narrations:
Al-Thram and Ibn Al-Mundhir narrated that 'Umar (may Allah be pleased with him) said, "I would stone to death the one who marries to permit the previous husband to return to his divorced wife. I would also stone to death the first husband."
Umar (may Allah be pleased with him) was asked about marring a woman to permit her to return to the previous husband, whereupon he said, "It is an illicit sexual relation."
Abdullah Ibn Sharauk Al-Amri said, "I heard Ibn Umar (may Allah be pleased with them both) when he was asked about a man who divorced his wife (his uncle's daughter) and someone else wanted to marry her to permit the former husband to remarry her. Ibn Umar (may Allah be pleased with him) explained, 'The former and latter are adulterers even if the marriage lasted for 20 years. However, the knowledge of the former husband by the aim of the marriage is the main criteria of incurring curse upon himself."
A man asked Ibn Abbas (may Allah be pleased with him), "My uncle's son has divorced his wife and so he became regretful." Ibn Abbas declared, "Your uncle's son disobeyed Allah and, therefore, he was inflicted with regret, whereas he obeyed Satan who will not relieve him." The man asked more, "What do you say in a man who wants to marry her to permit him to remarry her?" He disclosed, 'He, thus, seeks to deceive Allah, but it is Allah who deceives him."
Ibrahim An-Nakhi stated, "If the first husband, the second husband, or the woman intends to marry solely to permit the first husband to remarry his divorced wife, the marriage will be illegal."
Sa'id Ibn Al- Musayyab said concerning this issue, "It is prohibited in Islam."
However, Malik Ibn Anas, Al-layth Ibn Su'd, Sufyan Al- Thawri, Imam Ahmad and other great scholars are of the same opinion. Iman Shafi'i considers the contract of marriage, in which one is compelled to divorce his wife to permit her former husband to remarry her, is null and void.
Ascribing Associates To Allah, the Most High (Shirk)
Killing A Human Being
Not Performing The Prayer
Not Paying Zakat
Breaking One's Fast During Ramadan Without An Excuse
Not Performing the Hajj when Able to
Showing Disrespect to One's Parents
Severing the Ties of One's Relatives
Accepting Usurious Gain
Wrong Consuming An Orphan's Property
Lying About The Prophet
Fleeing From The Battlefield
The Leader Who Misleads His Followers, The Tyrant And The Oppressor
Arrogance, Pride, Conceit, Vanity And Haughtiness
Bearing False Witness
Accusing A Woman Of Adultery
Misappropriating Spoils Of War, Muslim Funds Or Zakat
Highwaymen Who Menace The Road
The Engulfing Oath
Taking People's Property Through Falsehood
The Consumption of Haram
The Dishonest Judge
Women Imitating Men And Vice Versa
The Pimp and the one Who Permits His Wife to Fornicate
Marrying Solely To Return To The Previous Husband
Not Freeing Oneself Of All Traces Of Urine
Showing Off In Good Work
Learning Sacred Knowledge For The Sake Of This World, Or Concealing It
Breach of Trust
Reminding Recipients of Ones Charity To Them
Disbelieving In Destiny (qadar)
Listening To People's Private Conversations
The Talebearer Who Stirs Up Enmity Between People
Breaking Promises or Pledges
Believing Fortune Tellers And Astrologers
Wife Rebelling Against Her Husband