Child Custody in the Quran
Question:

Does the Quran have any rules on child custody in case of divorce?

Reply
:

The Quran does not state which of the parents is entitled to have automatic custody following a divorce. Whenever the Quran does not contain a specific detail, it means that God left the decision to be decided by the people concerned. It does not mean that God forgot to include such a detail and is inviting us to seek the ruling in the books of hadith.

In the case of child custody, it is understandable why God would not give a fixed rule that applies to all cases of custody. It is because not every case is the same. In the majority of cases, particularly when the children are at a young age, the mother is more worthy to have custody of her children, while in others, the father would be more entitled. The best interest of the child should always be the deciding factor.
Many factors come into play such as the age of the child, the financial status of each parent, the special needs of the child, the health condition and stability of each parent, and so on. These factors mean that each case must be decided on its own merit.

God instructed that all matters which arise from a divorce, such as custody, be resolved through mutual consultation:

Confer among yourselves equitably. 65:6

Then if the two of them desire weaning by mutual consent and after due consultation, they incur no blame.
2:233

Custody should not be confused with child maintenance. The Quran places the responsibility of child maintenance on the man, each man according to his means:
And he, to whom the child was born, shall provide their provision and clothing equitably. No self is assigned except what is within its capacity. 2:233 (also 65:6-7)