Yes. Moses pbuh asked his Lord to forgive him by asking Allah the Almighty for two things:
First: Moses confessed his bad deed, when he said as Allah the Almighty narrates, “My Lord! I have definitely wronged my soul,”
He admitted what he did although the killing was by mistake and not planned.
Second: he asked Allah, Exalted and Sublime be He, for His Forgiveness, “so forgive me”. Allah the Almighty accepted his plea and forgave him.
This incident indicates that Allah, Exalted and Sublime be He, accepts the sincere repentance of His subject no matter how grave his crime is, since Allah is the Most Merciful towards his subjects, and He never punishes them for a sin they repent from. (“Moses pledged, “My Lord! For all Your favours upon me, I will never side with the wicked.”) (Al-Qasas 28: 16-17)
موسى عليه السلام دعا ربه بأمرين
الأول: اعترف بخطئه، “رب إني ظلمت نفسي” أي بقتلي للنفس-على الرغم أن القتل لم يكن قصدًا وإنما كان خطئًا.
الثاني: أنه طلب المغفرة من الله عز وجل، “فاغفر لي” هذا الخطأ، وقد استجاب الله تعالى دعاءه وغفر له.
وهذا يفيد أن الله عز وجل يقبل توبة عباده التائبين له مهما كانت جريمتهم التي ارتكبوها، وهو سبحانه الرحيم بهم، فلا يعذبهم بذنب تابوا منه.
( قالَ رَبِّ إِنِّي ظَلَمْتُ نَفْسِي فَاغْفِرْ لِي فَغَفَرَ لَهُ ۚ إِنَّهُ هُوَ الْغَفُورُ الرَّحِيمُ قَالَ رَبِّ بِمَا أَنْعَمْتَ عَلَيَّ فَلَنْ أَكُونَ ظَهِيرًا لِّلْمُجْرِمِينَ)
القصص 28 : 16-17