Abu Ja'far (may Allah have mercy on him) narrated that a man asked Sayyiduna Ali (may Allah be pleased with him) about the sacrificial animal: from which animals should it be? Sayyiduna Ali (may Allah be pleased with him) said: "From the eight kinds of animals." It was as if the man had some doubt about it, so Sayyiduna Ali (may Allah be pleased with him) said: "Do you recite the Qur'an?" He said: Yes. He said: "Have you heard this saying of Allah Almighty: 'O you who believe, fulfil your covenants. Grazing livestock have been made lawful for you' [Surah al-Ma'idah: 1]?" He said: Yes. He said: "Have you also heard this saying of Allah Almighty: 'So that they may mention the name of Allah over the livestock that He has provided for them' [Surah al-Hajj: 34], and this saying of Allah Almighty: 'And of the livestock He created some for carrying burdens and some low to the ground. O people, eat of what Allah has provided for you' [Surah al-An'am: 142]? Have you also heard this saying of Allah Almighty: '(Four pairs:) two sheep (male and female) and two goats (male and female). (O Prophet,) say: Has Allah forbidden the two males (of the sheep and goats, that is, the ram and the he-goat), or the two females (the ewe and the she-goat), or what (young) is in the wombs of the two females? Inform me with knowledge (proof), if you are truthful. And of the camels two and of the cattle two (male and female). (O Prophet,) say: Has Allah forbidden the two males (that is, the camel and the bull), or the two females (that is, the she-camel and the cow), or what is in the wombs of the two females?' [Surah al-An'am: 143-144]" He said: Yes. Sayyiduna Ali (may Allah be pleased with him) said: "Have you heard this saying of Allah: 'O you who believe, do not kill game while you are in the state of ihram' [Surah al-Ma'idah: 95], up to His saying: 'an offering brought to the Ka'bah' [Surah al-Ma'idah: 95]?" The man said: Yes. Then he said: I killed a gazelle; what expiation is due from me? Sayyiduna Ali (may Allah be pleased with him) said: "A sacrificial animal." Sayyiduna Ali (may Allah be pleased with him) said: "This sacrifice must be at the Ka'bah, as Allah Almighty has said."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 10151