The Torah does not tell us precisely when Moshe became aware of his Jewish origins, nor how his feelings for his people became so magnified that he came to their aid. The Torah rather tells us simply that when Moshe grew up, he saw the suffering of his Jewish brethren (שמות ב:י"א) Rashi (שם) comments on the word וירא, and he saw, explaining the word as referring not to physical seeing, but to reflection and understanding. Moshe's unwillingness to tolerate injustice or violence apparently preceded even his feelings of brotherhood, and may in fact have been what led to those feelings. Once he felt Bnai Yisrael's pain, he devoted himself to alleviating it.
The Ramban explains Moshe's newly discovered awareness somewhat differently, understanding the word וירא literally. He says that after Moshe became aware that he was Jewish, he went out to observe and become familiar with his true brethren. He was shocked when he saw their harsh suffering, and as a result he killed an Egyptian attacker. According to the Abarbanel, Moshe had actually become attached to Yocheved, his nursemaid (as well as his true mother) and to her children at a much younger age. When he grew up, he found out from them that he was their true son and brother. He then left the royal palace to observe his Jewish brethren working on the royal construction site outside the city, and thereby became familiar with their plight.
The Chasam Sofer sees the Posuk mentioned above as clarifying the way in which Moshe became so great in Hashem's eyes that He considered him worthy enough to be Hashem's agent of redemption. Moshe's exalted status was a reward for having shared in the pain of his people and having observed their suffering with sympathy. Chazal tell us that Hashem said to Moshe that just as Moshe has set aside his personal affairs and gone to observe the suffering of Bnai Yisrael, treating them like brothers, so too Hashem shall set aside the natural order of both Heaven and earth in order to speak to him. This is then the meaning of the Posuk later in our Parsha which states "וירא ה' כי סר לראות," "Hashem saw that he (Moshe) turned aside to see" (שם ג:ד). It means that Hashem saw Moshe turn aside from his own affairs to see the suffering of the people. Hence, the Posuk continues to say that Hashem called to Moshe from within the bush to appoint him as the new Jewish savior.