Midrash Petirat Moshe (Hebrew: מדרש פטירת משה)  or Midrash on the Death of Moses is one of the smaller midrashim.  This midrash describes in great detail the last acts of Moses and his death, at which the angels and God were present. There are several recensions of it, dating to between 7th and 11th centuries. The first, published at Constantinople in 1516 begins with a brief exegesis by R. Samuel Naḥmani and R. Tanhuma of the first verse of the pericope "V'Zot HaBerachah" (Deuteronomy 33:1-34:12), closing with its last verses, and doubtless intended for Simhat Torah. In 1693, the Midrash was translated into yiddish by Aaron ben Samuel, leading to its popularization with women.

Contents of the Midrash 
The real content of the midrash is an aggadic treatment of Deuteronomy 31:14 et seq., supplemented by an exegesis of Deuteronomy 3:23 et seq., and is filled with somewhat tedious dialogues between God and Moses, who is represented as unwilling to die. All his tears and entreaties were in vain, however; for God commanded all the princes of heaven to close the gates of prayer. In the last days of his life, until the 7th of Adar, Moses interpreted the Torah to Israel, and on the day of his death, according to Rabbi Helbo, he wrote thirteen Torahs, of which twelve were for the twelve tribes, and the best was for the Ark of the Covenant; some say that the angel Gabriel descended, and took the Torah from the hands of Moses, bearing it through each heaven to show the piety of its scribe, and that the souls of the holy read from this Torah on Mondays and Thursdays and on festivals. This is followed by a long section beginning with R. Josiah's account of the honors which Moses rendered Joshua, and the service which he did him in the last days of his life. Especially noteworthy here is the poetic prayer of Joshua beginning עורו רנו שמי השמים העליונים.

After this the close of Moses' life is depicted, a bat kol (heavenly voice) giving warning with increasing insistence of the hours, even of the seconds, that remained for him. This enumeration of the hours and the conventional formula יצתה בת קול are important for the determination of the dependence of the additions in Deuteronomy Rabbah 11 and the second recension on the original version. Early in the midrash the angels Gabriel and Zangaziel, "the scribe of all the sons of heaven," are mentioned; but in the last hours of the life of Moses it is Samael, the head of the Satans, whose activity is most conspicuous as he watches for the passing of the soul, while Michael weeps and laments. At last Samael receives the command to bring the soul of Moses, but flees in terror before his glance. Again he appears with a drawn sword before Moses, but he has to yield before the "shem ha-meforash," carved on the staff of the leader of Israel. The last moment approaches, however, and God Himself appears to receive Moses' soul. The three good angels accompany Him to prepare a resting-place for Moses, whose soul at length is taken in the kiss of death.

Other recensions 
Large portions of this midrash are contained in Deuteronomy Rabbah where they must be regarded as later additions. The entire passage represented by Deuteronomy Rabbah 11:9-10 is found also, combined in the same manner, in Yalkut Shimoni where the Midrash Petirat Mosheh is given as the source. Sifre 305 contains an exquisite little aggadah on Moses and the angel of death. A long citation from the beginning of the midrash is also contained in a homily in Tanhuma on the same theme, the death of Moses.

A second recension is based on Proberbs 31:39, and is considered by Adolf Jellinek, but probably incorrectly, to be the older. It was edited by him and has an entirely different beginning from that which is found in the other recension. As it is based upon a defective manuscript, the manner in which this introduction was connected with the original midrash can not be determined; but what follows the missing portion does not differ essentially from that found in the first recension, although it is somewhat shorter and is changed in arrangement. Moses' lament that he may never taste the fruits of the land receives a long explanatory addition to the effect that he grieved not for the products of the earth, but because he would be unable to fulfill the divine commands pertaining to the Land of Israel.

A third recension or revision of the midrash was published by Gilbert Gaulmyn (Paris, 1692), together with a Latin language translation and the first recension. In the Assumptio Mosis the manuscript ends abruptly before the account of the assumption from which that work receives its name. According to Emil Schürer, this concluding portion must have related to the dispute of the archangel Michael with Satan, mentioned in Jude 9.

References 

.  The JE cites the following works:
Zunz, G. V. p. 146;
Adolf Jellinek, B. H. i., p. xxi.; vi., pp. xxi. et seq.;
Emil Schürer, Gesch. 3d ed., iii. 219 et seq.
.

Smaller midrashim
7th-century books
Moses