G-d said to Moses: "Do Me a favor and tell Aaron that he is to die, for I am ashamed to tell him."
What did Moses do? He rose early in the morning and went to Aaron, and called to him: "Aaron, my brother!" Aaron came out to him and asked: "Why did you see fit to come so early today?" Said Moses to him: "There was something in the Torah which occupied my mind during the night and which I had difficulty with, so I rose early and came to you." Asked Aaron: "What was this thing?" Said Moses to him: "I do not remember what it was, but I know that it was in the Book of Genesis; bring it and let us read from it."
So they took a scroll of the Book of Genesis and read from it. With each chapter and each thing they read, Moses would say: "G-d did well; G-d created well." When they came to the creation of man, Moses said: "What can be said of man, who brought death into the world!" Said Aaron: "Moses, my brother, can you say that in this matter we do not accept the Divine decree?" … Said Moses: "And I, who ruled over the ministering angels, and you, who stopped death [with the ketoret], shall we, too, come to this?"… Immediately Aaron felt his demise in his bones… Said Aaron to him: "’My heart trembles within me, and the terrors of death are befallen me’ (Psalms 55:5)."
Said Moses to him: "Are you prepared to die?" Said he: "Yes." Said Moses: "Let us then ascend Hor HaHar." Thereupon the three of them–Moses, Aaron and Elazar–ascended before the eyes of all of Israel…
When they ascended [the mountain], a cave opened up for them…
Said Moses to Aaron: "Enter the cave." He entered, and he saw there a made-up bed and a burning candle. Said Moses to him: "Go up onto the bed." He went up. "Straighten your arms." He straightened them. "Close your mouth." He closed it…
Thereupon the Shechinah (Divine Presence) came down and kissed him.
(At that moment, Moses desired a death such as that. Thus it was later said to him (Deuteronomy 32:50): "And you will die on the mountain… as Aaron your brother died on Hor HaHar"–the death which you coveted.)
G-d said to them: "Go out from here." As soon as they went out, the cave was sealed, and Moses and Elazar descended.
(Yalkut Shimoni; Rashi)
When Moses and Elazar descended from the mountain, the people assembled against them and demanded of them: "Where is Aaron?" They answered them: "He is dead." "How could the Angel of Death strike him?" they cried. "He is a man who has withstood the Angel of Death and restrained him! (As it is written, ‘And he stood between the dead and the living, and the plague was stayed’– Numbers 18:13.) If you bring him back, well and good; if not, we shall stone you!" Thereupon Moses resorted to prayer, and said: "Master of the Universe! Deliver us from suspicion." Straightway the Holy One, blessed be He, opened the cave and showed Aaron to them. Thus the verse states: "And all the congregation saw that Aaron had died…."
For Aaron, "all the house of Israel"–both men and women–wept; but regarding Moses it says only that "the sons of Israel" wept for him (Deuteronomy 34:8). For Moses would rebuke them with harsh words. Aaron never said to a man, "You have sinned!" or to a woman, "You have sinned!" … [Instead,] when Aaron would walk along and meet with an iniquitous person, he would greet him, "Shalom!" The next day, when this person desired to commit a transgression, he would say to himself: "Woe is to me! How will I show my face afterwards to Aaron, who greets me all the time?" As a result, this person would refrain from the transgression.
If two people quarreled, Aaron would go and sit with one of them and say to him: "My son, have you seen what your friend is doing? He beats his breast and rends his clothes, saying: ‘Woe is to me! How can I lift my eyes to see my friend? I am ashamed to show myself to him, for I have done him offence!’" And so he would sit with him, until he removed the jealousy from his heart. Then Aaron would go and sit with the other and say to him: "My son, have you seen what your friend is doing? He beats his breast and rends his clothes, saying: ‘Woe is to me! How can I lift my eyes to see my friend? I am ashamed to show myself to him, for I have done him offence!’" And so he would sit with him, until he removed the jealousy from his heart. When the two would meet, they would embrace and kiss each other…
There were thousands in Israel named after Aaron, because were it not for Aaron, they would not have come into the world. For Aaron would make peace between husband and wife, and they would come back together and call the child by his name.
(Avot d’Rabbi Natan, ch. 12)