Most commentators feel that God struck Moses with a life-threatening illness by which He was going to kill, to slay. It came to Moses, undoubtedly during prayer or meditation, that the problem was his resisting God in the circumcision of his son.
There is an interesting sidelight here. From the information provided, the son had not been circumcised because Moses conceded to Zipporah that the son would not be circumcised. What God was teaching Moses is that, as the head of the house, he was responsible to see that God's rules, orders, policies, and directions were followed.
Once he passed the test, Moses was convinced of something else: He knew that Zipporah could not go with him to Egypt. Therefore, he sent her back, and he went on alone. At least his life was spared because he followed through in doing what he should have done.
John W. Ritenbaugh
Conviction, Moses and Us