Ibn Mas'ud (may Allah be pleased with him) said that:
"The Messenger of Allah (Peace be upon him) cursed the man who marries a women after her divorce solely to permit her first husband.”
However, this ruling comes in accordance with the opinion of all men of profound knowledge like 'Umar Ibn AI-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-Nasa'i in his Sunan with sahih transmission.
Ibn 'Abbas (may Allah be pleased with him) said that the Messenger of Allah (Peace be upon him) 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.”
'Uqbah Ibn 'Amr said that the Messenger of Allah (Peace be upon him) once asked, "Would I tell you about the hired billy goat?" "Yes: O Messenger of Allah!" the people said. He (Peace be upon him) 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.”
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 (Peace be upon him), 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:
AI-Thram and Ibn AI-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 AI-`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-Nakh'i 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 AI- Musaib said concerning this issue, "It is prohibited in Islam."
However, Malik Ibn Anas, Al-layth Ibn Su'd, Sufyan AI-Thawri, Imam Ahmad and other great scholars are of the same opinion. Imam 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.
 Reported by At-Tirmidhi.
 Reported by Ibn Majah.
 Mentioned by Ibn Hagar in Majma' Al-Zawaid and reported by Ibn Majah.
Please write: COMMENT in this box to verify that you are human