Question: If the Lord wanted Moses to lead the Israelites out of Egypt then why in 4:24 it says the Lord met him there and tried to kill him.
Answer: In this story we are given minimal and strange details but apparently, during Moses' years in Midian, he had not obeyed God's command (cf. Gen. 17:10-14) to circumcise one (or both?) of his sons. So God was about to kill Moses, for this disobedience. Zipporah, Moses' wife, circumcised her son with a flint so God would spare Moses.