In the Old Testament, God told Moses to free the Israelites from Egypt where they were enslaved. The Pharoah of course was very stubborn and proud, and this resulted in the plagues of Egypt. One of these were the killing of all the first born children in Egypt. God told the Israelites to paint lamb's blood (a perfect lamb) on their doorposts, and He would PASS OVER them, and their children would be spared from this plague.
Just after this event, the Israelites were freed from slavery and left Egypt to journey to the Promised Land. The celebration of Passover is however not for their freedom from Egypt, but that God passed over their first born children because of the blood of a lamb.