The baby Moses, his existence endangered by the pharaoh's edict calling for all Hebrew sons to be slain, is set adrift in a basket on the Nile before being discovered--and adopted--by one of the pharaoh's wives.
The Pharaoh's edict was not a threat to baby Moses.