According to God’s promise to Abraham, His due time had arrived for Him to deliver the nation of Israel from “the iron furnace” of Egypt. Jehovah considered Israel as his firstborn son by virtue of the promise to Abraham. When Jacob went down to Egypt with his household, he went down voluntarily but his descendants later became slaves. As a nation, they were dear to Jehovah as a firstborn son, and Jehovah had the legal right to deliver them from Egypt without the payment of a price.—De 4:20; 14:1, 2; Ex 2:22; 19:5-6
The tribe of Ephraim became the most prominent tribe of the northern kingdom of ten tribes, its name often standing for that entire kingdom. Because Jehovah chose to have Ephraim receive the firstborn son’s blessing from his grandfather Jacob instead of Manasseh, the real firstborn son of Joseph, Jehovah rightly spoke of the tribe of Ephraim as “my firstborn"
And if you recall Esau sold his birthright to Jacob for a bowl of stew. Just because they were born fisrt didn't mean they received their birthright!