How does the life of Joseph (son of Jacob) foreshadow the life of Jesus the Messiah? In theology, there are many things identified in the Old Testament as foreshadowing things in the New.  The life of Joseph, the son of Jacob, is one of these that is identified as such the life of Jesus.  

What is the identification based on and how exactly does the life of Joseph foreshadow the life of Jesus the Messiah?
Joseph foreshadows the life of Jesus a few ways, and I'm sure that the list I'm about to give you isn't exhaustive by any stretch of the imagination, but I'll try to give a brief parallel summaries of both stories, which may help to highlight the similarities between both situations. 

Joseph


Joseph says things that seem to claim he has a certain elevated position above his brothers. 
Because of these things, his brothers attempt to be rid of him, via selling him into slavery.
Joseph is then gone for a time in Egypt.
He then returns to their lives providing a way to escape the coming famine. 
He repays evil with good. 
God uses the evil that his brothers intended to do to not only validate Joseph's claims, but also provide good for Joseph's brothers. 


Jesus


Jesus says things that seem to claim he has a certain elevated position above others. 
Because of these things, people attempt to be rid of him, via crucifixion. 
Jesus is then gone for a time in the grave. 
He then returns to their lives providing a way to escape the consequences of their sin. 
He repays evil with good. 
God uses the evil that his brothers intended to do to not only validate Christ's claims, but also provide good for all. 


In short, Joseph was a type of Christ in that he saved those who desired to do him harm from themselves being harmed.