With God descended from heaven three angels, Michael, Gabriel. and Zagzagel. Gabriel arranged Moses' couch. Michael spread upon it a purple garment, and Zagzagel laid down a woolen pillow. God stationed Himself over Moses' head, Michael to his right, Gabriel to his left, and Zagzagel at his feet, whereupon God addressed Moses: "Cross your feet," and Moses did so. He then said, "Fold your hands and lay them upon your breast," and Moses did so. Then God said, "Close thine eyes," and Moses did so.
Then God spoke to Moses' soul: "My daughter, one hundred and twenty years had I decreed that you should dwell in this righteous man's body, but hesitate not now to leave it, for your time is run." …But the soul replied: "Lord of the world! I desire to remain with this righteous man; for whereas the two angels Azza and Azazel when they descended from heaven to earth, corrupted their way of life and loved the daughters of the earth, so that in punishment You suspended them between heaven and earth, the son of Amram, a creature of flesh and blood, from the day upon which You revealed Yourself from the bush of thorns, has lived apart from his wife. Let me therefore remain where I am."
When Moses saw that his soul refused to leave him, he said to her: "Is this because the Angel of Death wishes to show his power over you?" The soul replied: "Nay, God does not wish to deliver me into the hands of death." Moses: "Will you, perchance, weep when the others will weep at my departure?" The soul: "The Lord has delivered mine eyes from tears."' Moses: " Will you, perchance, go into Hell when I am dead?" The soul: " I will walk before the Lord in the land of the living." When Moses heard these words, he permitted his soul to leave him, saying to her: "Return unto your rest, O my soul; for the Lord hath dealt bountifully with thee." God thereupon took Moses' soul by kissing him upon the mouth.
Moses' activity did not, however, cease with his death, for in heaven he is one of the servants of the Lord. God buried Moses' body in a spot that remained unknown even to Moses himself. Only this is known concerning it, that a subterranean passage connects it with the graves of the Patriarchs. Altough Moses' body lies dead in its grave, it is still as fresh as when he was alive.
From the Legends of the Jews, Bialek and Ravnitsky
Go up to this mount Abarim: Why is this [passage] juxtaposed here [with the previous passage]? When the Holy One, blessed is He, said, “You shall certainly give them…” (verse 7), he [Moses] said, “The Omnipresent commanded me to allocate the inheritance! Perhaps the decree has been annulled, and I will enter the Land?” The Holy One, blessed is He, said to him, “My decree remains as it was” (Mid. Tanchuma Pinchas 9). Another interpretation: Since Moses had entered the territories of the descendants of Gad and the descendants of Reuben, he rejoiced, saying, “It seems that the vow [made] regarding me has been annulled.” This can be compared to a king who decreed that his son could not enter the portals of his palace. He [the king] entered the gate, with him [the son] following; the courtyard, with him following; the foyer with him following. When he was about to enter the inner chamber, he said to him, “My son, from here on, it is forbidden for you to enter.” - [Sifrei Pinchas 23]
God of the spirits: Why is this said? He said to Him, “Master of the universe, the character of each person is revealed to you, and no two are alike. Appoint over them a leader who will tolerate each person according to his individual character.”- [Mid. Tanchuma Pinchas 10]