Burying a Muslim is a collective duty by consensus, when burial is possible.
دَفْنُ الْمُسْلِمِ فَرْضُ كِفَايَةٍ إِجْمَاعًا إِنْ أَمْكَنَ.
دَفْنُ الْمُسْلِمِ فَرْضُ كِفَايَةٍ إِجْمَاعًا إِنْ أَمْكَنَ.
The niche in the side of the grave is for us and the excavation in the middle is for others.
اللَّحْدُ لَنَا وَالشَّقُّ لِغَيْرِنَا
Make a niche for me in the side of the grave and set up bricks over me as was done in case of Allah's Messenger (ﷺ).
الْحَدُوا لِي لَحْدًا وَانْصِبُوا عَلَىَّ اللَّبِنَ نَصْبًا كَمَا صُنِعَ بِرَسُولِ اللَّهِ صلى الله عليه وسلم
The grave should always be deep enough to retain the odour of the body and protect it from wild beasts.
It is better, if the earth is hard enough, that the grave should be hollowed out laterally rather than a simple trench.
The corpse should be laid on the right side, facing the kibla
والسنة أن يلحد قبر الميت
ويضع الميت في اللحد على جنبه الأيمن مستقبل القبلة بوجهه
ثُمَّ يُوضَعُ عَلَى شِقِّهِ الأَْيْمَنِ مُتَوَجِّهًا إِلَى الْقِبْلَةِ، وَيَقُول وَاضِعُهُ: بِسْمِ اللَّهِ وَعَلَى مِلَّةِ رَسُول اللَّهِ؛
forbade that the graves should be plastered or they be used as sitting places (for the people), or a building should be built over them.
أَنْ يُجَصَّصَ الْقَبْرُ وَأَنْ يُقْعَدَ عَلَيْهِ وَأَنْ يُبْنَى عَلَيْهِ
I heard the Messenger of Allah (ﷺ) commanding (us) to level the grave.
سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَأْمُرُ بِتَسْوِيَتِهَا
فصل: ويكره البناء على القبر وتجصيصه, والكتابة عليه
It is considered blamable to plaster a tomb, to adorn it with a monument, or place inscriptions upon it.
Sitting or walking on a tomb is forbidden,
Seek forgiveness for your brother, and beg steadfastness for him, for he will be questioned now.
اسْتَغْفِرُوا لأَخِيكُمْ وَسَلُوا لَهُ التَّثْبِيتَ فَإِنَّهُ الآنَ يُسْأَلُ
وَأَمَّا قَبْل دَفْنِهِ فَيَرَى الْحَنَفِيَّةُ وَهُوَ رِوَايَةٌ عَنْ أَحْمَدَ أَنَّهُ لاَ بَأْسَ بِنَقْلِهِ مُطْلَقًا، وَقِيل إِلَى مَا دُونَ مُدَّةِ السَّفَرِ، وَقَيَّدَهُ مُحَمَّدٌ بِقَدْرِ مِيلٍ أَوْ مِيلَيْنِ. وَذَهَبَ جُمْهُورُ الشَّافِعِيَّةِ وَالْحَنَابِلَةِ إِلَى أَنَّهُ لاَ يَجُوزُ نَقْل الْمَيِّتِ قَبْل الدَّفْنِ مِنْ بَلَدٍ إِلَى آخَرَ إِلاَّ لِغَرَضٍ صَحِيحٍ.
وَأَمَّا الْمَالِكِيَّةُ فَيَجُوزُ عِنْدَهُمْ نَقْل الْمَيِّتِ قَبْل الدَّفْنِ وَكَذَا بَعْدَهُ مِنْ مَكَانٍ إِلَى آخَرَ بِشُرُوطٍ هِيَ: - أَنْ لاَ يَنْفَجِرَ حَال نَقْلِهِ - أَنْ لاَ تُنْتَهَكَ حُرْمَتُهُ - وَأَنْ يَكُونَ لِمَصْلَحَةٍ: كَأَنْ يُخَافَ عَلَيْهِ أَنْ يَأْكُلَهُ الْبَحْرُ، أَوْ تُرْجَى بَرَكَةُ الْمَوْضِعِ الْمَنْقُول إِلَيْهِ، أَوْ لِيُدْفَنَ بَيْنَ أَهْلِهِ، أَوْ لأَِجْل قُرْبِ زِيَارَةِ أَهْلِهِ، أَوْ دَفْنِ مَنْ أَسْلَمَ بِمَقْبَرَةِ الْكُفَّارِ، فَيُتَدَارَكُ بِإِخْرَاجِهِ مِنْهَا، وَدَفْنِهِ فِي مَقْبَرَةِ الْمُسْلِمِينَ. فَإِنْ تَخَلَّفَ شَرْطٌ مِنْ هَذِهِ الشُّرُوطِ الثَّلاَثَةِ كَانَ النَّقْل حَرَامًا
34. It is forbidden to carry a corpse to another town—though some authorities consider it merely blamable—unless the death occurred in the neighbourhood of Mecca or Medina—or, according to a decision of Shafii, Jerusalem—for then it may always be carried into one of these holy cities.
فلا يجوز بحالٍ إحراقُ جثث موتى المسلمين
لا يجوز تنفيذ وصية المسلم إذا أوصى بحرق جثته قبل موته؛ لأن في ذلك انتهاكًا لكرامته، وحرمة الإنسان ميتًا كحرمته حيًّا، ويجب على المسلمين الصلاة عليه والاستغفار له ودفنه بالطريقة الشرعية
Breaking a dead man's bone is like breaking it when he is alive.
كَسْرُ عَظْمِ الْمَيِّتِ كَكَسْرِهِ حَيًّا
وقد قال عليه السلام: (كسر عظم الميت ككسر عظم الحي) رواه أبو داود
It is also forbidden to utter lamentable cries, or to manifest extravagant signs of sorrow, as e.g. by striking the breast.
All, however, agree that it is forbidden to disinter a body, whether in order to carry it elsewhere or for any other reason, except in case of necessity,
FUNERAL expenses are a first charge upon the total of the deceased's estate
next his debts must be paid
and then his testamentary dispositions may be executed, but only with regard to one-third of what is left of the estate, after deducting the debts.
and that the expense is a first charge upon the succession
while, if the deceased person has left nothing the expense must be borne by those liable for the maintenance of the deceased,
ذَهَبَ جُمْهُورُ الْفُقَهَاءِ إِلَى أَنَّ كَفَنَ الْمَيِّتِ فِي مَالِهِ إِنْ كَانَ لَهُ مَالٌ وَيُكَفَّنُ مِنْ جَمِيعِ مَالِهِ إِلاَّ حَقًّا تَعَلَّقَ بِعَيْنٍ كَالرَّهْنِ (٢) ، وَيُقَدَّمُ عَلَى الْوَصِيَّةِ وَالْمِيرَاثِ؛
1. One should make haste to pay the deceased’s debts and execute his testamentary depositions.
Ruling 521. Based on obligatory precaution, a believer who is dying – i.e. breathing his last breaths – must be laid on his back if possible, in a way that the soles of his feet face qibla, whether the believer is male or female, an adult or a child.
Ruling 524. It is recommended to perform talqīn[1] on a dying person with the shahādatayn (two testimonies),[2] the avowal (iqrār) of the Most Noble Prophet (Ṣ) and the Infallible Imams (ʿA), and other rightful beliefs of the faith in a manner that he understands. It is also recommended that the things mentioned above be repeated until the time of death.
[1] Talqīn refers to impressing principle beliefs upon a dying person or corpse.
Ruling 527. In order to comfort a dying person, it is recommended to recite at his side the blessed surahs of Yāsīn,[3] al-Ṣāffāt,[4] and al-Aḥzāb;[5] and to recite Āyat al-Kursī,[6] verse fifty-four of Sūrat al-Aʿrāf,[7] and the last three verses of Sūrat al-Baqarah.[8] In fact, [it is recommended] to recite as much of the Qur’an as possible.
Ruling 529. After someone has died, it is recommended to close his lips, eyes, and mouth, straighten his hands and legs, and cover him with a piece of cloth.
However, if his death is not certain, people must wait until it is certain.
If someone dies at night, [it is recommended] to keep the place where he died lighted, inform the believers about the funeral, and hasten in burying his body.
Ruling 530. It is obligatory for the guardian of a Muslim who has died to give him ghusl and to camphorate, shroud, perform prayers over, and bury him, even if the deceased is not a Twelver (Ithnā ʿAsharī) Shia. The guardian must either do these things himself or instruct someone else to do them;
If the deceased does not have a guardian or the guardian refuses to do those things, it is obligatory for every mukallaf to do them as a collective obligation (al‑wājib al‑kifāʾī)
Ruling 534. The guardian of a woman is her husband. In other cases, the guardian of a deceased person is the heir in accordance with the order of the tiers of inheritance, which will be mentioned later. In each tier, men take precedence over women;
Furthermore, if there are a number of guardians, the permission of one of them suffices.
Ruling 538. It is obligatory to give a corpse three ghusls in the following order:
1. a ghusl with water that has been mixed with lote tree (sidr) leaves;
2. a ghusl with water that has been mixed with camphor (kāfūr);
3. a ghusl with ordinary water.
Ruling 553. [The method of performing] the ghusl given to a corpse is the same as that of the ghusl for janābah; and the obligatory precaution is that one must not give a corpse immersive ghusl if it is possible to give it sequential ghusl. If sequential ghusl is given, the right side must be washed before the left side.
Ruling 547. A man cannot give ghusl to a woman who is not his maḥram. Similarly, a woman cannot give ghusl to a man who is not her maḥram. A husband and wife can give ghusl to one another.
Ruling 549. Those who are maḥram can give ghusl to one another, whether they are maḥram by being biological/blood relatives – for example, a mother and a sister – or by way of breastfeeding, or by marriage.
However, based on obligatory precaution, a man can only give ghusl to a maḥram woman when he cannot find a woman who can give ghusl to her, and vice versa [i.e. a woman can only give ghusl to a maḥram man when she cannot find a man who can give ghusl to him].
Ruling 543. One who gives ghusl to a corpse must be sane, Muslim, and, based on obligatory precaution, a Twelver Shia; furthermore, he must know the rulings of ghusl.
Furthermore, if one does not find water or there is an obstacle to using water, he must perform one tayammum on the corpse instead of giving it ghusl; and the recommended precaution is to perform three tayammums on it.