Laws of Muktzeh on Shabbos
16. If a fire breaks out on Shabbos and one fears that a corpse will be consumed by the flames, it is permitted to carry it together with a non-muktzah item; thus, one should place a piece of food on it or next to it and carry the two together (1). If there is no food available, one may place a non-muktzeh utensil or garment [on the corpse and remove it]. If these also are not available, one may remove the corpse by itself (2).
Regardless of the circumstances, one may take the corpse only to an area into which it is permitted to carry on Shabbos. Only a Gentile may take it into an area into which it is forbidden to carry on Shabbos (3).
(1) Carrying the corpse along with a non-muktzeh item, minimizes the appearance of muktzeh being carried (See Mishna Berura 311:2). This method may only be used for a corpse, and not for other muktzeh items, due to the importance of protecting the dignity of a corpse.
(2) The Sages were concerned that if saving the corpse from the fire would not be permitted, one may come to put out the fire on Shabbos in a panic to save the corpse, thereby violating a Biblical prohibition (extinguishing a fire) rather than a rabbinical one (muktzeh).
(3) There are many details and different opinions as to when, how and to where a corpse may be moved on Shabbos, most of which cannot be covered here. For further details please see the Shulchan Aruch Chapter 311 and the Mishna Berura there.