And Joseph’s master took him, and put him into the prison, a place where the king’s prisoners were bound: and he was there in the prison. (Genesis 39:20)
Trouble seemed to follow Joseph. Granted, some of it he brought upon himself, for instance: “And Joseph dreamed a dream, and he told it his brethren: and they hated him yet the more” (Genesis 37:5). The dream prophesied that Joseph would rule over them and they would bow down to him (Genesis 37:6-7), “And they hated him yet the more for his dreams, and for his words” (Genesis 37:8b). This was probably not the best way to win friends and influence people!
But not all of Joseph’s problems were self-inflicted. “Now Israel loved Joseph more than all his children, because he was the son of his old age: and he made him a coat of many colours. And when his brethren saw that their father loved him more than all his brethren, they hated him, and could not speak peaceably unto him” (Genesis 37:3-4). Eventually, Jacob’s sons conspired to kill Joseph (Genesis 37:18-20), but Ruben intervened to save him (vv.21-22). The brothers, then, resorted to plan B, and sold him to a band of Ishmaelites on their way to Egypt. Joseph was then sold to Potiphar, Pharaoh’s captain of the guard.
Joseph’s managerial capabilities were soon noticed by Potiphar who made him chief steward of his household (Genesis 39:3-4). The problem was that Potiphar’s wife also took notice of Joseph, but she was not interested in his management skills (v. 7). Joseph’s integrity was greater than she could overcome, so she trumped up false charges of attempted rape against him (vv. 10-18), and poor Joseph ended up in prison for doing what was right (v 20). In spite of this setback, Joseph maintained his faith in God and his integrity, and quickly rose to the position of head trustee of the prison (vv. 21-23).
Of course, we know the rest of the story. Joseph eventually rose to the rank of prime minister of Egypt and because of his position was able to save all of his family. Joseph endured persecution from his own family and from strangers, and by his faithfulness proved the truth of the Bible: “And we know that all things work together for good to them that love God, to them who are the called according to his purpose” (Romans 8:28).