51 because ye trespassed against me in the midst of the children of Israel at the waters of Meribah of Kadesh, in the wilderness of Zin; because ye sanctified me not in the midst of the children of Israel.

Matthew Henry's Commentary on Deuteronomy 32:51

Commentary on Deuteronomy 32:48-52

(Read Deuteronomy 32:48-52)

Now Moses had done his work, why should he desire to live a day longer? God reminds him of the sin of which he had been guilty, for which he was kept from entering Canaan. It is good for the best of men to die repenting the infirmities of which they are conscious. But those may die with comfort and ease, whenever God calls for them, notwithstanding the sins they remember against themselves, who have a believing prospect, and a well-grounded hope of eternal life beyond death.