When Moses was a prophet:
And when he brought them the Truth from Our presence, they said: Slay the sons of those who believe with him, and spare their women. But the plot of disbelievers is in naught but error.
Qur'an 40:25
When Moses was an infant:
Throw (the child) into the chest, and throw (the chest) into the river: the river will cast him up on the bank, and he will be taken up by one who is an enemy to Me and an enemy to him': But I cast (the garment of) love over thee from Me: and (this) in order that thou mayest be reared under Mine eye.
Qur'an 20:39
So when did the Pharaoh order the killing of baby Hebrew boys?