The ruling for releasing oneself from ihram due to an illness
What is the ruling if I enter ihram at Medina for hajj tamattu' and fall ill and consequently remove my ihram garments before performing 'umrah?
If you fear sudden illness after entering ihram and it is difficult for you to continue the rites of hajj, we advise you to make the intention of istithna` (exception) before entering ihram. You can do this by resolving in your heart and uttering the intention such as by saying, "I intend to perform 'umrah (or hajj depending on your circumstances). If anything prevents me from its performance, my release from ihram shall be in that place where I am prevented."
If you do this and are later prevented from completing the rites by a valid excuse, you may release yourself from ihram at the place where you are without the need to go to al-Haram to complete the rites. It suffices to release yourself from ihram from where you are by slaughtering a hady from among the livestock animals and distributing its meat among the poor of the place where you have been prevented from continuing the rites. It is likewise permissible to send the hady to al-Haram to be slaughtered there if possible. You are then to shave or shorten your hair. 'A`isha (may God be pleased with her) narrated that the Prophet asked Duba'a Bint al-Zubair, "Do you intend to perform hajj?" She replied, "By God, I did intend to but I am in pain." The Prophet told her, "Perform hajj and set a condition and say, 'O God! I shall release myself from ihram from the place where You prevent me" [Recorded in the Sahih of Bukhari and Sahih of Muslim].
It is incumbent to make the intention to release yourself from ihram when slaughtering as well as for shaving or shortening your hair after slaughtering due to the words of God,
And do not shave your heads until the offering reaches the place of sacrifice. [Al-Baqarah, 196]
If by your question you mean, removing your ihram garments on account of an illness while remaining in a state of ihram and completing the rites, then this is permissible. However, it is obligatory to slaughter a hady that fulfills the specifications of a sacrificial animal, fast three days or give out in charity three sa's of food that fulfill the requirements of zakat-ul-fitr and distribute them among six of the poor or the impoverished, each receiving half a sa'. Ka'b Ibn 'Ugza (may God be pleased with him) narrated that the Prophet told him while on hajj, "It may be that the lice on your head are troubling you; shave your head and fast three days, feed six impoverished persons or slaughter a sheep or goat" [Bukhari and Muslim]. This is because of the words of God Who says,
And if any of you is ill, or has an ailment in his scalp (necessitating shaving), (he should) in compensation either fast, or feed the poor or offer sacrifice. [Al-Baqarah, 196]