Praise be to Allah.
Zakaat al-fitr is obligatory upon every Muslim, whether male or female, young or old, because of the hadeeth of Ibn ‘Umar (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) enjoined zakaat al-fitr upon the people at the end of Ramadan, a saa‘ of dates or a saa‘ of barley, upon everyone, free or slave, male or female, among the Muslims. Narrated by al-Bukhaari (1504) and Muslim (984). The orphan is included in the general meaning of the word people.
Based on that, if the orphan has any wealth, zakaat al-fitr must be paid from it; it is an obligation upon him that he must pay from his own wealth, and the one who is sponsoring him does not have to give zakaat al-fitr on his behalf, because he is able to afford it. But if his sponsor gives it on his behalf voluntarily, that is acceptable.
An-Nawawi (may Allah have mercy on him) said: The orphan who has wealth is obliged to pay his zakaat al-fitr from his wealth, in our opinion. That was also the view of the majority of scholars, including Maalik, Abu Haneefah and Ibn al-Mundhir. End quote from al-Majmoo‘, 6/109
Al-Bahooti said in Kashshaaf al-Qinaa‘ (2/247): It is obligatory upon every Muslim… male or female, old or young, because of the report quoted above, even if he is an orphan. It must be paid from the individual’s wealth. That was stated [by Imam Ahmad]. End quote.
But if the orphan does not have any wealth, then his zakaat al-fitr must be paid by the one who is Islamically obliged to spend on this orphan among his relatives. As for the one who is sponsoring him: he is not obliged to pay zakaat al-fitr on his behalf, because he is spending on him voluntarily.
This is the view of the majority of scholars (including the three imams, Abu Haneefah, Maalik and ash-Shaafa‘i), because they say that zakaat al-fitr is obligatory upon every Muslim and those whom he is obliged to support. The one who sponsors an orphan is voluntarily sponsoring him, so he is not obliged to give zakaat al-fitr on behalf of the orphan.
The view of Imam Ahmad is that whoever is spending on a person during the month of Ramadan, even if he does so voluntarily, is obliged to give zakaat al-fitr on that person’s behalf. Imam Ahmad stated that whoever takes in an orphan girl must give zakaat al-fitr on her behalf.
Some of the Hanbalis, such as Ibn Qudaamah, favoured the view that this is not obligatory, and they interpreted the words of Imam Ahmad mentioned above as meaning that it is mustahabb (recommended).
See: al-Mughni (4/306); ash-Sharh al-Kabeer, (7/97)
To sum up: the one who voluntarily sponsors an orphan is not obliged to pay zakaat al-fitr on behalf of the orphan. Rather zakaat al-fitr must be paid from the orphan’s wealth if he has any wealth; if he does not have any wealth then zakaat al-fitr must be paid by his relative who is Islamically obliged to spend on him.
And Allah knows best.