Joseph stayed in Egypt, along with all of his father's family. He lived 110 years.
He lived long enough to see Ephraim's children and grandchildren. When the children of Makir were born, they were placed on Joseph's knees and counted as his own children. Makir was the son of Manasseh.
Joseph said to his brothers, "I'm about to die. But I'm sure that God will come to help you. He'll take you up out of this land. He'll bring you to the land he promised with an oath to give to Abraham, Isaac and Jacob."
Joseph made the sons of Israel take an oath and make a promise to him. He said, "I'm sure that God will come to help you. Then you must carry my bones up from this place."
So Joseph died at the age of 110. They prepared his body to be buried. Then he was placed in a casket in Egypt.