The Prophet (peace and blessings be upon him) said: “Among lawful things, divorce is most hated by Allah.” (Reported by Abu Dawud). Spouses should avoid divorce as much as possible. If they have difficulties and problems they should try to work out their differences and seek help from their relatives, friends or professional counsellors. They should also consider and think of the future of their children and the destructive effects of divorce on their children’s future. However, if the differences are irreconcilable then divorce is permissible, but it should be done in a decent manner.
In this regard, Allah Almighty says: “When ye have divorced women, and they have reached their term, then retain them in kindness or release them in kindness. Retain them not to their hurt so that ye transgress (the limits). He who doeth that hath wronged his soul. Make not the revelations of Allah a laughing stock (by your behaviour), but remember Allah’s grace upon you and that which He hath revealed unto you of the Scripture and of wisdom, whereby He doth exhort you. Observe your duty to Allah and know that Allah is Aware of all things.” (Al-Baqarah: 231) The Prophet (peace and blessings be upon him) says, “No harm shall be inflicted or reciprocated in Islam.”

As for the custody of children, as a general role in Islam, daughters should remain with their mother until they get married. As for male kids, they should remain with their mother until they reach the age of puberty, and then shifted to their father in order to get acquainted with the traits of manhood. However, what decides this is the court system of each country.

Sheikh Shaker Elsayed, a prominent Muslim scholar and Imam of the Islamic Center, Wash. D. C., states the following:

The custody of the children is subject to court system where the spouse are located. Even a Muslim judge will have to hear both sides to decide the case as both views have to be known to decide which parent is fit more than the other.”