On the day Moshe was born, all the boys, even the Egyptian boys, were thrown in to Nile. The reason being, since Pharoh saw through Astrology that on this day the savior of the Jewish people would be born and he was unsure if this savior was Jewish or Egyptian. He therefore decreed on that day that all boys should be thrown in to the Nile. So how did the daughter of Pharoh know that Moshe was Jewish, maybe he was an Egyptian who was thrown in to the Nile?
The Gemarah in Sotah 12b states that the daughter of Pharoh knew that Moshe was Jewish because he had a Bris Milah. The Bris Milah was a Mitzvah that was done even prior to Mattan Torah. It was commanded to Avraham who passed on this Mitzvah to all his descendants.
Another explanation how she knew he was Jewish, is because Moshe was 3 months old at that time. If this baby was an Egyptian, it would have been a baby that was born on that day, since the decree on the Egyptians was only for that day. However the decree to throw the Jewish babies in to the Nile was an on going decree, and would therefore make sense that the baby in the Nile was a Jewish baby who was 3 months old.