The Egyptian Guard (real name: Baka) is a minor yet significant antagonist in The Prince of Egypt. He is one of the key factors in bringing about Moses' transformation from one of Egypt's royalty to God's chosen defender of the Hebrew people.
The Egyptian Guard was a cruel taskmaster whose job was to ensure that the Hebrew slaves worked to the expectations of the Pharaoh Seti I and completed tasks on time - with severe punishments for those who could not do either: he was particularly cruel in this regard and had no mercy for any of the slaves who were of age (none of the guards are seen abusing Hebrew children, who were too young to be of use in manual labor) - the elderly had no such exemptions and thus frail and often weak men were beaten just as badly as younger and more able men.
However, one day, the guard would go too far and began to mercilessly whip an elderly slave to the point that Moses (already in shock after learning of Seti's genocide and his own Hebrew heritage) became upset at the needless cruelty and attempted to intervene: Moses first tried to order the guard to stop but the guard didn't hear his order, which prompted Moses to rush over and try to stop the beating by force.
This would prove deadly as Moses accidentally pushed the guard after trying to remove his whip, which caused the guard to panic and in his confusion fall from a great height to his death: this prompted another guard named Kahma to look over the body (buried under rubble) and demanded to know who had done the act, to his surprise it was revealed to be Prince Moses - now exposed Moses became horrified at what he had done and began to flee on foot, despite Rameses pursuing him and promising that as royalty Moses had nothing to fear, since Rameses could simply use his supreme right as future Pharaoh to dismiss the crime completely, still shaken by events Moses declares that even if Rameses could clear him of the crime it meant nothing as he would still be a murderer, he then fled into the desert.
The Egyptian guard's death would come back to haunt Moses many years later when he returned to Egypt under God's command - with Hotep and Huy stating Moses should be put to death for the murder: however, Rameses makes good on his years-old promise to Moses and officially clears him of any wrong-doing, unfortunately Moses once again defies his brother and stands before the Pharaoh, demanding he set the Hebrew people free on command of God, sparking the inevitable war between the two former brothers.
Much like Goliath, the Egyptian Guard is a controversial figure as his villainous actions are argued to simply be him doing what was appropriate in his time and culture - however, in terms of scripture (and the film The Prince of Egypt itself), his cruelty to the Hebrew people makes him an enemy of God and thus a villain within the setting.
The guard's cruelty was a symbolism for the overall cruelty of the era, especially against the Hebrews, this would be used to justify why the regime (and ultimately Rameses himself) had to fall.