Ruling on differentiating between children in gift-giving
Question

Is it permissible for me to give something to one of my children and not to his brothers? What if that is done for a reason, such as his good attitude or his obeying his parents?
Praise be to Allah.The scholars are agreed that it is prescribed in Islam to treat children fairly when it comes to gift-giving; they should not single out one or some of them and not give to others. 
Ibn Qudamah said in al-Mughni (5/666): “There is no dispute among the scholars that it is mustahabb to treat children equally and that it is makrooh to differentiate between them.” 
But there are differences of opinion concerning the ruling on differentiating between them. The strongest views in terms of evidence are two opinions – and Allah knows best. These two opinions are: 
1 – That it is absolutely haram to differentiate between them. This is the well known view among the Hanbalis (see Kashshaaf al-Qinaa’, 4/310; al-Insaaf, 7/138). This is also the view of the Zaahiriyyah (i.e., it is the same whether the differentiation is done for a reason or for no reason). 
2 – That it is haram to differentiate between them unless that is for a legitimate shar’i reason. This was narrated from Ahmad (al-Insaaf, 7/139) and was the view favoured by Ibn Qudaamah (al-Mughni, 5/664) and Ibn Taymiyah (Majmoo’ al-Fatawa, 31/295). 
The evidence quoted by both groups that say that it is haram to differentiate between one’s children is the report narrated by al-Bukhaari (2586) and Muslim (1623) from al-Nu’maan ibn Basheer, who said that his father brought him to the Messenger of Allah (peace and blessings of Allah be upon him) and said: “I have given this son of mine a slave who used to belong to me.” The Messenger of Allah (peace and blessings of Allah be upon him) said, “have you given a similar gift to all of your children?” He said, “No.” The Messenger of Allah (peace and blessings of Allah be upon him) said, “Then take (your gift) back.” 
According to another version (al-Bukhaari, 2587; Muslim, 1623), al-Nu’maan ibn Basheer said: “My father gave me a gift of some of his wealth, but my mother, ‘Amrah bint Rawaahah, said, ‘I will not approve of it until you ask the Messenger of Allah (peace and blessings of Allah be upon him) to bear witness to it.’ So my father went to the Prophet (peace and blessings of Allah be upon him) to ask him to bear witness to the gift. The Messenger of Allah (peace and blessings of Allah be upon him) said to him, ‘Have you done the same for all of your children?’ He said, ‘No.’ He said, ‘Fear Allah and treat your children justly.’ So my father came back and took back that gift.” 
According to a version narrated by Muslim, the Messenger of Allah (peace and blessings of Allah be upon him) said: “O Basheer, do you have any other children?” He said, “Yes.” He said, “Have you given all of them a similar gift?” He said, “No.” He said, “Then do not ask me to bear witness to this, for I do not bear witness to injustice.” The evidence in this hadeeth is clear: 
1 – The Prophet commanded justice, and a command implies that it is obligatory.
2 – He explained that showing preference to one child or singling him out to the exclusion of the others is falsehood and injustice, in addition to his refusal to bear witness to it and his commanding him to take back his gift. All of that indicates that differentiating between one’s children is haram.
They also referred to the evidence of common sense: 
Ibn Hajar mentioned in Fath al-Baari (5/214): 
Among the evidence of those who say that it is obligatory to treat one’s children equally is the fact that this (differentiating between children) is the first step that may lead to something haram, because cutting off family ties and disobeying one’s parents are two things which are haram, so that which leads to them may also be haram, and differentiating between one’s children is something that may lead to them. 
This is supported by something which was mentioned in a version narrated by Muslim (1623): “He [the Prophet (peace and blessings of Allah be upon him)] said, ‘Ask someone else to bear witness to this.’ Then he said: ‘Would you like your children to all honour you equally?’ He said, ‘Of course.’ He said, ‘Then do not do this.’” 
Further evidence is the fact that preferring some of them to others generates enmity and hatred between them, and also between them and their parents, so that is not allowed (al-Mughni, 5/664); this meaning is similar to that mentioned above. 
Those who favoured the second opinion, that it is permissible to differentiate between one’s children when there is a need, a reason or an excuse, quoted as evidence the hadeeth narrated by Maalik in al-Muwatta’, with his isnaad from ‘Aa’ishah (may Allah be pleased with her) who said that Abu Bakr al-Siddeeq had given her as a gift twenty wisq of his wealth, but when he was on his deathbed he said, “By Allah, O my daughter, there is no one whom I would like to see rich after I die more than you, and there is no one whom it hurts me to see poor after I die than you. I had given you twenty wisq, and if you have already gone and collected them, then they are yours, otherwise whatever I leave is to be divided among all my heirs, who are your two brothers and your two sisters, so divide it amongst yourselves according to the Book of Allah…”  
Ibn Hajar said in al-Fath (5/215): its isnaad is saheeh. 
The evidence from this hadeeth, is as Ibn Qudaamah mentioned, “It may be that Abu Bakr gave it only to ‘Aa’ishah because she was in need and was unable to earn a living, even though she enjoyed a unique status as one of the Mothers of the Believers, and other virtues.”
(Adapted from al-Mughni, 5/665) 
As justification for Abu Bakr’s action, al-Haafiz said in al-Fath (2/215): “ ‘Urwah said concerning the story of ‘Aa’ishah that her brothers and sisters had agreed to that.”
(Kitaab al-‘Adl bayna al-Awlaad, p. 22 ff) 
Ibn al-Qayyim (may Allah have mercy on him) said that it is haram in absolute terms in Ighaathat al-Lahfaan, 1/540. He said: “If there were no clear saheeh Sunnah reports that disallowed that, then by analogy and based on the principles of sharee’ah and its concern for people’s interests and to protect them from evil, it would have to be haram.” 
Shaykh Ibn Baaz (may Allah have mercy on him) stated that it is absolutely forbidden to show preference to some of one’s children over others, and that it is obligatory to treat them all equally, males and females alike, in accordance with their shares of inheritance, unless they give permission and are adults of sound mind. (al-Fatawa al-Jaami’ah li’l-Mar’ah al-Muslimah, 3/1115, 1116) 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: it is not permissible for a man to give some of his sons preferential treatment over others, but he may differentiate between males and females, giving the males double what he gives the females, because the Prophet (peace and blessings of Allah be upon him) said: “Fear Allah and treat your children fairly.” So if he gives one of his sons 100 dirhams, he has to give the other sons 100 dirhams each as well, and give the girls 50 dirhams each, or else take back the money that he gave to the first son. This that we have mentioned is to be applied in cases other than the spending which is obligatory; with regard to obligatory spending, he should give each one whatever he needs. So if it so happens that one of his sons needs to get married, and he gets him married and gives him the mahr because the son is not able to pay the mahr, then in this case he does not have to give all the other sons the same as he gave to the one who needed to get married, because getting one’s children married is part of spending on them. Here I want to draw attention to something that some people do out of ignorance, which is when a man has sons who have reached marriageable age, he gets them married, and he has other children who are still small, he makes a will saying that in the event of his death, they should be given money equal to that which was spent on the adult children. This is haram and is not permissible because this will is a will that gives something to an heir, and willing something to an heir is haram, because the Prophet (peace and blessings of Allah be upon him) said: “Allah has given everyone his due, so there is no will for an heir.” (This version narrated by Abu Dawood, 3565; al-Tirmidhi, 2/16 and others. The isnaad of this version was classed as hasan by al-Albaani, and the version “There is no will for an heir” was classed as saheeh in al-Irwa’, 6/87). So if he says, “I am leaving this money for them in my will because I got their brothers married for a similar amount,” we say that if these young children reach marriageable age before you die, then get them married for the same amount of money as you got their brothers married, but if they do not reach that age (before you die) then you do not have to get them married. 
Fatawa Islamiyyah, 3/30.