All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
It is not permissible to buy the Udh-hiyah from the money allotted for Zakah for it does not belong to the payer of Zakah, which means that he is not entitled to use it to buy a sacrificial animal or something else. Rather, it belongs to the eight categories of due recipients, which are mentioned in a verse that reads (what means): {Zakah expenditures are only for the poor and for the needy and for those employed to collect [it] and for bringing hearts together [for Islam] and for freeing captives [or slaves] and for those in debt and for the cause of Allaah and for the [stranded] traveler – an obligation [imposed] by Allaah. And Allaah is Knowing and Wise.} [Quran 9:60] Read about these eight categories in detail in Fatwa 27006.
Accordingly, it is not permissible to buy the sacrificial animal from the money of Zakah. However, if you use the money of charity that you used to pay when profits were generated, then this is permissible, unless the charity is obligatory on you by virtue of a vow. So, if it is obligatory by a vow, then it is not permissible for you to spend this money on buying an Udh-hiyah. Instead, you should spend it in the way that you specified in your vow. Fulfillment of a vow is obligatory, whereas the Udh-hiyah should be bought from one's own money, not from money that he is required to pay in the first place.
Allaah Knows best.