Sacrifice of a castrated animal
For sacrifice, an animal which is free of all defects must be selected. As far as castration is concerned, in animals, castration is not concerned a defect, so the sacrifice of such an animal is perfectly valid. In fact, the sacrifice of such an animal is preferred. The Holy Prophet (Sallallahu alaihi wa sallam) sacrificed castrated goats. As mentioned in this Hadith of Sunan Ibn Majah:
It is narrated on the authority of Hadhrat Aisha Siddiqua and Hadhrat Abu Hurairah (May Allah be well pleased with them) that whenever the Holy Prophet (Sallallahu alaihi wa sallam) would decide to sacrifice animals, He (Sallallahu alaihi wa sallam) would select 2 plump, horned, spotted and castrated goats and would sacrifice one on the behalf of those people of the Ummah who testified to the Unity of Allah Most High and the Prophethood of the Holy Prophet (Sallallahu alaihi wa sallam) and another on behalf of Himself and His family.
(Sunan Ibn Majah, Pg No. 225/226, Hadith No: 3113)
As mentioned in Fatawa A’alamgiri:
(Fatawa A’alamgiri, Vol. 5, Pg No. 299)
It is given in Tabyeen Ul Haqaiq, Vol. 6, Kitab Ul Azhiya, Pg No. 479:
Translation: Hadhrat Imam Azam Abu Hanifa (May Allah be well
pleased with him) said that the sacrifice of a castrated animal is
preferred, as its meat is excellent and tasty.