At the beginning of the chapter, he had just been sold into slavery by his brothers. Then, he got sold to Potiphar who was a high-ranking official in the government.
He soon proved to be a very good servant, and he was put in charge of virtually the entire household. Even though he was still a slave, it was obvious that he was highly valued and cared for by the master of the house.
Then, trouble started to brew when Potiphar’s wife fell in love with Joseph. He resisted her for a long time, but at one point when he was running away from her, she grabbed his robe and virtually used it to frame him.
Gen 39:17 And she spake unto him according to these words, saying, The Hebrew servant, which thou hast brought unto us, came in unto me to mock me:
Gen 39:18 And it came to pass, as I lifted up my voice and cried, that he left his garment with me, and fled out.
Gen 39:19 And it came to pass, when his master heard the words of his wife, which she spake unto him, saying, After this manner did thy servant to me; that his wrath was kindled.
Gen 39:20 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.
In one day, his life went from pretty good to prison on an entirely made-up charge.
If this story stopped right there, it would be easy to think, “Where was God? Why would a good God allow something like this to happen?”
That first question is answered in the next verse, and the rest of the answer will be found in the near future.
Gen 39:21 But the LORD was with Joseph, and shewed him mercy, and gave him favour in the sight of the keeper of the prison.
God was right there with Joseph the entire time even though something that seemed bad happened. Going to prison on a false charge would make me pretty mad. However, that wouldn’t be a healthy reaction.
Think about the Shepherd’s Psalm.
Psa 23:4 Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.
The shadow of death must be pretty grim times, but we don’t need to fear it because God is always with us. Similarly, Joseph was in a very tough situation, but he didn’t need to worry because he knew that God was right there with him.
If you’re ever tempted to wonder where God is when things go wrong, remember that He is right there beside you. There is no problem that we need to go through alone when we lean on God and trust in His plan. (The answer to the second question will be posted in two days in case you’re wondering).