The Case of Prophet Musa (a.s.)

Chapter 28 (al-Qasas) Verses 15-16

And he entered the city at a time when its people were not aware [of his presence], and found therein two men fighting: one was from his party and the other was from his enemies. [When] the one who was his follower [saw Músa, he] cried out to him for help against the one who was from his enemies. So Músa [went and] struck him with his fist and killed him.
[Then Músa] said, “This is Shaytan's deed (عمل الشيطان); surely he is an open enemy who leads [others] astray.” [Músa] said, “My Lord! I surely have been (ظلمتُ نَفسي) unjust to myself; therefore (فاغفر لي) forgive me.” So [Allah] ( غَفَرَ) forgave him; He is the Forgiving, the Merciful.”
The common translation of the last verse combined with the statement about the Shaytan creates conflict with the concept of 'ismah, infallibility. When reading these verses, keep the following points in mind:

What Músa did was not a crime; he went to help an oppressed person and, in the process, struck a blow with his fist at the oppressor. This ended, unexpectedly, in the death of the oppressor. Helping an oppressed person is a praiseworthy act in itself. The death of the oppressor, at most, can be labeled as accidental death that is not a crime or a sin.

Músa's words that “This is Shaytan's deed” does not necessarily refer to his own action. Remember that the Shaytan himself knew his limits; he says to Allah,

“…I will certainly mislead them all together except the devoted servants of Your's from among them.” (38:82-83)

And Allah says to the Shaytan,

“…As for my servants, you have no power over them except those who follow you from among the misled people….” (15:41)

And Músa surely was not among the misled servants of Allah!

So the sentence that “this is Shaytan's deed” refers to the mischief started by the oppressor himself.
As for the sentence that “My Lord I have surely been unjust to myself,” this must be interpreted in light of the meaning of dhulm explained in the case of Prophet Adam (a.s.). Its correct translation would be: “My Lord I surely have put myself into harm” — after the accidental death of the oppressor, Músa was pursued by the people of Fir'awn.

Then how do you explain the sentence after that which says that “ighfir li” which means “forgive me” and “ghafara” which means that Allah “forgave him”?

Again, the common meaning of ghafara (forgiving) is not applicable here. The word “ghafara” also means “to watch over someone” or “to guard someone” or “to cover something [i.e., protect it]”. This second meaning does not imply any sin; it just means that by accidentally killing the oppressor, Músa found himself in harm and trouble from the people of Fir'awn; and, therefore, he prays ”…therefore, guard me and Allah guarded him.”

This meaning of the last sentence is also supported by another verse of the Qur'an which quotes Allah saying to Músa that, “…when you killed an [Egyptian] man [accidentally and were being pursued by Fir'awn's people], We delivered you from the worry…” (20:40) So the dhulm is explained in this verse as “worry”; and “ghafara” is explained as “delivered”.