Genesis 39: How to Resist Temptation Like Joseph in Egypt

By David Whitaker

I spent last weekend regluing a dining chair that should have held up longer. The previous owner had fixed a wobbly leg with a screw and some wood filler. It looked right from across the room, but the joint gave out under weight. There was no structural integrity underneath the surface.

Genesis 39 is a chapter about a man whose internal joints held. Joseph is sold into slavery, bought by an Egyptian official named Potiphar, and placed in charge of the household. Everything goes well until it does not. Potiphar's wife takes notice of Joseph and makes her intentions clear. He refuses her, day after day, until she frames him and he lands in prison.

The chapter moves fast. The core question it asks is simple: what do you do when doing the right thing costs you everything?

The Lord Was With Joseph in Genesis 39

The text opens by telling us the Lord was with Joseph. This phrase appears four times in the chapter and serves as the backbone of the whole story.

And the Lord was with Joseph, and he was a prosperous man; and he was in the house of his master the Egyptian. (Genesis 39:2)

Joseph is a slave when this is written about him. He is not free and does not control his own schedule or movements. Yet the Lord is with him. Blessing depends on presence, not on circumstances.

Potiphar notices the difference. Everything Joseph touches succeeds. The household runs better and the fields produce more. Potiphar puts Joseph in charge of everything he owns. The same pattern repeats in prison. The keeper notices it too.

This matters because most of us read this story knowing how it ends. Joseph becomes second in command of Egypt. But he did not know that yet. He was living verse by verse, unsure if he would ever leave. The presence of the Lord promised companionship, not escape.

There is a parallel here to Genesis 37: The Coat, the Pit, and the Grain That Runs Through It. Both chapters show a Joseph who keeps moving forward despite what happens to him.

How to Resist Temptation Like Joseph in Genesis 39

Potiphar's wife does not approach Joseph once. What follows is not a single dramatic confrontation. A slow, grinding pressure repeats day after day until it breaks you or you break away.

Joseph's response is clear. He refuses based on two things: his loyalty to Potiphar and his accountability to God.

There is none greater in this house than I; neither hath he kept back any thing from me but thee, because thou art his wife: how then can I do this great wickedness, and sin against God? (Genesis 39:9)

The structure of that question matters. Joseph does not start with what he will lose socially or weigh the risk of getting caught against the reward of giving in. He goes straight to God. His concern is avoiding sin, not consequences.

When the final confrontation comes and she grabs him by his garment, Joseph does not negotiate. He just runs, leaving his clothing behind.

There is a lesson in that for anyone who has ever tried to argue with temptation. Some situations cannot be reasoned through. You have to leave.

Dealing With Injustice When You Do the Right Thing

Joseph does the right thing and ends up in prison. Potiphar's wife tells a lie. He is thrown into the king's prison.

The injustice is hard to miss. Joseph did exactly what he should have done. His reward was chains.

This is the part of the story that does not fit the way we want faith to work. Integrity is supposed to be rewarded visibly and immediately. That happens sometimes but not always. Joseph's integrity led him to a prison cell.

But the text keeps using that same phrase. The Lord was with Joseph in prison, after the butler forgot him, and through years the text skips over in a few verses.

I think about this when I face smaller versions of the same problem. I do something right and it backfires. The short-term outcome is worse than if I had taken the easy path. That kind of thing happens. It happened to Joseph. The difference was not in his circumstances. The difference was in who stayed with him through them.

Meaning of the Lord Was With Joseph in Prison

The end of the chapter mirrors the beginning. Joseph is in prison now instead of Potiphar's house, but the same pattern repeats. The Lord is with him again and he finds favor with the keeper, who puts him in charge of the prisoners.

But the Lord was with Joseph, and shewed him mercy, and gave him favour in the sight of the keeper of the prison. (Genesis 39:21)

Prison is where Joseph meets the butler and the baker, which leads to Pharaoh's dream and everything that follows. The text calls the prison a place where the Lord was with Joseph. That suggests the prison was part of the path, not an interruption.

I build furniture. Some of the most important work happens before the piece is assembled. You plane the boards, cut the joints, then clamp and wait for glue to dry. None of that shows in the finished product. But without that hidden work the piece falls apart.

The prison years were preparation. You just cannot see the purpose from inside it.

Frequently Asked Questions

Why did Joseph end up in prison if he did the right thing?

Doing the right thing does not always produce immediate rewards. Joseph was falsely accused by Potiphar's wife and imprisoned for something he did not do. The text emphasizes that even in prison, the Lord remained with him and used that time to position him for future leadership in Egypt.

How did Joseph resist the advances of Potiphar's wife?

Joseph grounded his refusal in his relationship with God. He asked how he could commit such wickedness and sin against God, which pushed past human consequences to something deeper. When the pressure became immediate, he did not try to reason with the situation. He fled.

What does it mean that the Lord was with Joseph while he was a slave and a prisoner?

It means God's presence does not depend on outward circumstances. Joseph was not free and did not control his own life, yet he experienced divine guidance and favor. That presence showed up as competence, trust, and success in whatever responsibility he was given.

What can modern readers learn from Joseph's time in prison?

Periods of waiting and obscurity are often preparation for what comes next. Joseph's time in prison connected him to people who would eventually bring him before Pharaoh. The chapter suggests that God works through seasons of confinement, not just seasons of freedom.


The chair I reglued has been holding steady all week. I took the screw out, cleaned the old filler out of the joint, applied real glue, and clamped it overnight. The job took longer than the quick fix would have, but the joint is sound now. Joseph's integrity worked the same way. He did not take shortcuts. He stayed true day after day and let the joints set. The Lord was with him through all of it.

— D.

Genesis 39: How to Resist Temptation Like Joseph in Egypt