“And [Moshe] turned this way and that way, and he saw that there was no one, and he smote the Egyptian” (Sh’mos 2:12). The simplest reading of this verse is that before killing the Egyptian who was beating up an Israelite, Moshe looked around to make sure that no one was looking. Indeed, this is how some (e.g. Abarbanel, see Chasam Sofer/Toras Moshe; Rashi alludes to it as well) understand it. Rashi, based on the Midrash, explains the verse to mean that he took notice of what the Egyptian had done to the Israelite in his house (with his wife) and what he had done to him in the field (beating him), “looked” to make sure that none of his descendants would convert, and then killed him. The notion that Moshe could “see” all of the Egyptian’s descendants in order to determine what would be lost if he was killed (preventing those descendants from being born) raises several issues.
Some armchair philosophers raise the issue of it being impossible to see any descendants, since Moshe had killed him. Whom was there to “see”? Obviously there were no future descendants if he had no future! Nevertheless, however Moshe was able to “see” that none of the Egyptian’s descendants would convert (most assume it was through “Ruach HaKodesh”), it could easily be that he “saw” what would have been had he not killed him, not a vision of any real future as if he were a time-traveler. Since Moshe saw that had the Egyptian lived he would still not have any descendants who would convert, he did not hold back from killing him.
Another “armchair philosophy” issue: If Moshe could know there’d be descendants who would convert, wouldn’t that take away their ability to freely choose to do so? This is similar to the question raised regarding G-d’s absolute knowledge of the future and our free-will. However, in the latter conundrum, there really is no contradiction, as G-d is outside of time, so the “future” is the same to Him as the “past” is to us. Therefore, His knowledge is the result of our choices, even if, from our time-bound perspective it seems as if His knowledge preceded our choices. On the other hand, the Egyptian never really had any “descendants” for Moshe to somehow be informed about; they didn’t exist in the “future” either, so couldn’t be “known” the same way we “know” things that happened in the past. Nevertheless, G-d “knows” whether there was any potential latent within this Egyptian for anything positive to have come from him (see Targum Yonasan, also see Ayeles HaShachar, although he explains Sanhedrin 96a differently than most seem to), and Moshe could have “tuned in” to this information through “Ruach HaKodesh” and realized that there was no possibility of converts. Besides, Moshe’s “knowledge” was not absolute, and could have just been that there would have been descendants who converted, not which specific ones would convert.
The commentators are perplexed as to why descendants converting would impact Moshe’s decision to put the Egyptian to death. Do we take descendants into account whenever a death sentence is issued? If anything, the Talmud teaches us just the opposite: “A [pregnant] woman being brought out to be executed (after being convicted of committing a sin that has a death penalty) is not delayed until after she gives birth” (Arachin 7a). Not only aren’t we concerned about the descendants of anyone who is executed, but we don’t even wait for a pregnant women to give birth (if she hasn’t gone into labor yet) before executing her! Addionally, when Moshe was told to smite Midyan because of what they had done (Bamidbar 25:17), the Talmud (Bava Kama 38a) says he would have included Moav in the “smiting” (since they were at least as involved as Midyan was) had G-d not told him not to. Why was Moav excluded? Because Rus and Na’ama would come from them (Bava Kama 38b, see Rashi on Bamidbar 25:18 and 31:2). The starting point (before G-d corrected Moshe), though, is that we don’t take possible future descendants into account when considering whether someone should be put to death; why did Moshe take it into account here?
[The most widely given answer is that descendants are not taken into account when the death penalty is issued by a court, but if it is issued in heaven they are. Since Moshe killed the Egyptian by uttering G-d’s name (see Rashi on Sh’mos 2:14), it is as if he was killed by heavenly decree, and the descendants therefore had to be taken into account. I’m not sure why the method Moshe chose to kill the Egyptian affects what to take into account; if Moshe determined that he should be put to death, and a Jewish court would have made the same determination, then just as the court wouldn’t have taken the descendants into account, Moshe shouldn’t have either. (It would also seem that the decree against Midyan qualified as a “heavenly decree,” since it came as a command from G-d; if Moshe knew that heavenly decrees take descendants into account, he should have known not to include Moav without being told explicitly to include them.) It should be noted that Sh’mos Rabbah (1:29) says Moshe asked the angels whether the Egyptian should be killed, and they told him that he should; this would certainly qualify as being a “heavenly decree.” Interestingly, this Midrash has Moshe consulting with the angels only about whether the Egyptian should be put to death, not about whether he will have any descendants who will convert; that part Moshe figured out on his own. Midrash Lekach Tov has it the other way around, with Moshe asking them about the Egyptian’s descendants but not about whether or not he should kill him. ]
Some (e.g. Nachalas Yaakov) compare Moshe killing the Egyptian to the youths who were killed by bears after Elisha cursed them for making fun of him (M’lachim II 2:23-24), as the Talmud (Soteh 46b) says that he killed them after seeing that they had no mitzvos, “not in them, nor in their descendants until the end of all generations.” However, there seem to be several differences between the two cases. First of all, Elisha was punished for this (Soteh 47a), while the Torah seems to frame Moshe’s sticking up for his “brother” despite being raised in Pharaoh’s palace in a very positive light. (This might simply being a function of the level of wrongdoing in each case, and/or what should have been expected from each of the wrongdoers.) Secondly, Elisha was a full-fledged prophet, and we might expect a prophet to be able to “see to the end of all generations.” At this point in Moshe’s life, though, he had not yet experienced prophecy, and “seeing to the end of all generations” sounds like a lot to accomplish via Ruach HaKodesh. [Chasam Sofer (Toras Moshe) says Moshe didn’t see that Dasan and Aviram were watching despite having “turned this way and that” to make sure that no one was around because he hadn’t yet reached the level of prophecy and had to focus intently on being able to “look” at the Egyptian’s descendants through Ruach HaKodesh.] Nevertheless, making such a comparison may yield an interesting possibility.
If Elisha acted inappropriately by cursing these youths (as the Talmud indicates), it is difficult to attribute his being able to “see” their potential descendants to prophecy. Is prophecy a “tool” to be used at the prophet’s discretion, regardless of whether it will used for appropriate things, or is it a level through which one can become attuned to things on a spiritual plane, allowing the prophet to receive divine messages? Although I don’t have any first-hand experience with prophecy, it seems to be the latter. Therefore, when he was belittled by the youths, his being a prophet was likely not a factor in his being able to “see” their descendants (only in his curse being effective, since despite this error he was still a holy person). I would suggest that rather than actually “seeing” their descendants, Elisha had worded his curse to include the stipulation that it only apply if the youths were so bereft of mitzvos that there was no possibility of any good ever coming from them. Since there were no mitzvos “in them or their descendants,” the stipulation was fulfilled and the curse became active.
This can be applied to Moshe as well. Seeing the Egyptian beating the Israelite, Moshe realized that if he didn’t do anything, the Israelite would be murdered (see Sh’mos Rabbah 1:28). He wanted to stop the beating, but didn’t want to kill the Egyptian if he would ever contribute anything positive. Therefore, using G-d’s holy name, he cursed the Egyptian that he should die if he wouldn’t have had any descendants who would convert. Since there wouldn’t be any, the curse became active, and the Egyptian died.