Shortly speaking...
Shortly speaking, this sentence indicates that Moses did not change to the habit of the castle, the environment where he lived, and, as far as he could, he tried to help the right and justice, though today the details of it are not clear to us.
Then the one that was of his own party sought his help against the one who was of his enemies, so Moses struck him with his fist and killed him. He said: ‘This is of the Satan’s doing; verily, he is an enemy that manifestly misleads’.” The reformers of the society should sometimes informally, unknowingly and without any title come among people. Before his prophethood, Moses (as) had some companions and followers, too.
Though he was grown up in the castle of Pharaoh, the oppressed people had mostly accepted him as their supporter and leader because of his thought and manner. However, the verse says: “And he entered the city at a time when its people were unheeding…” It is not clear that which city it was that Moses entered, but most probably it was the capital of Egypt.
As some Islamic commentators have said, Moses had been condemned to be banished from the capital of Egypt as the result of the daily increasing discords he had against Pharaoh and his governmental system. But, in a special time when people were unaware, Moses entered the capital.
This is also probable that the purpose of entering the city was his coming out from the castle of Pharaoh, because the castle of the kings were usually built by the city so that they could control the ways of coming and going. The objective of the sentence ’at a time when its people were unheeding’ is the time when the people of the city stopped their business and no one was exactly taking care of the circumstances of the city. But at what hour it happened?