Praise be to Allah.
The scholars say that what is required is to offer the hadiy of tamattu‘ within the boundary of the Haram zone, because Allah, may He be exalted, says (interpretation of the meaning):
“then their place of sacrifice is at the ancient House”
Moreover, the Prophet (blessings and peace of Allah be upon him) slaughtered his sacrificial animal in Mina, and he said: “Learn from me your rituals [of Hajj].” The hadiy is a sacrifice that must be offered as part of the Hajj rituals, so it must be offered in the appropriate place, which is the Haram. Based on that, whoever slaughters his sacrifice outside the Haram zone, his sacrifice is not valid, and he must offer it again within the boundary of the Haram. If he was unaware of the ruling, then there is no sin on him, but if he was aware of it, then he is guilty of sin.
The author of al-Furoo‘ (3/465) indicated that it is obligatory to slaughter the sacrifice within the boundary of the Haram according to the consensus of the four imams, but ash-Shirazi said in al-Muhadhdhab (p. 411): If the muhrim (pilgrim in ihram) is obliged to offer a sacrifice because of ihram, such as the sacrifice required of one doing tamattu‘ or qiraan, or a sacrifice as a penalty for wearing perfume whilst in ihram, or as a penalty for hunting whilst in ihram, then he must give its meat to the poor of the Haram, because Allah, may He be exalted, says (interpretation of the meaning): “as an offering [to Allah ] delivered to the Ka'bah” [al-Maa’idah 5:95]. If he slaughters it outside the boundary of the Haram and brings it into the Haram, then it depends: if the meat has changed and become rotten, then it is not acceptable, because what is required is meat that is in perfect condition and has not become rotten, so rotten meat is not acceptable. If it has not changed (and become rotten), then there are two views concerning it: The first view is that it is not acceptable, because the place of slaughter is restricted to the Haram zone.
The second view is that it is acceptable, because the purpose behind it is the meat, and he has delivered it to them [namely the poor of the Haram].
An-Nawawi said: And this is the correct view.
But to be on the safe side, this should be avoided, because of the evidence that were quoted at the beginning of our answer.
Majmoo‘ Fataawa Ibn ‘Uthaymeen (22/226-227).