There is a difficult group of verses (4:24-26) in the middle of the story in the Parsha that takes place when Moshe is on his way back to Egypt to begin the Exodus. While Moshe stops at a hotel with his family, G-d looks to encounter him and kill him. Tziporah, Moshe's wife, immediately circumcises their son and the threat is avoided. The story then continues on. The commentaries from the time of the Talmud are baffled by this story and the details of it. How could Moshe be moments from death as he is on his way to free the Bnei Yisroel?
I believe the answer can be found based on an idea the Rambam writes about at the beginning to his opening commentary on the Mishnah. The Rambam explains that there are four types of prophets, two within the realm of prophesizing in the name of idolatry and two in the name of Hashem.
1.A. The prophet who says a foreign deity came to him and commanded him to worship them. He then encourages the masses to follow suit.
1.B. The prophet who says he received a message from Hashem to begin worshipping a foreign deity such as the sun or the moon. He may even provide miracles and wonders.
2.A. The prophet who prophesizes in the name of Hashem and encourages people to strengthen their faith and service to Him. However, he notes the Hashem also told him to add/subtract a commandment; this also includes reinterpreting a commandment that the Oral Torah explains.
2.B. The prophet who prophesizes in the name of Hashem and calls to others to strengthen their faith and service to Him without any exceptions or ramifications. He warns them about sinning and gives them directives based on his visions.
The first three categories of prophets are to be executed for being false prophets; only the last category is accepted. With this information in mind, let us return to the story of Moshe. He is to be the prophet that returns to Egypt to save the Bnei Yisroel. He even performs miracles with his staff, his hand, and the river water. However, his son would not be circumcised at the time. What if someone from the Bnei Yisroel noticed this? This would put Moshe's validity into question and theoretically make him liable to the death penalty as the lack of a bris would mean that he did not believe in such a commandment. What Hashem was doing was holding Moshe accountable and giving him the chance to correct this mistake before he went to Egypt and therefore was moments away from killing him.
The lesson here is how one should be consistent in their service to Hashem in every facet, especially when it comes to core beliefs and foundations.