King David not only committed adultery, but he arranged the death of Bathsheba's husband.
The entire narrative is in 2 Samuel 11.
2 One evening David got up from his bed and strolled around on the roof of the palace.
From the roof he saw a woman bathing—a very beautiful woman.
3 So David sent someone to inquire about her, and he reported, “This is Bathsheba, daughter of Eliam and wife of Uriah the Hittite.”
4 David sent messengers to get her, and when she came to him, he slept with her.
14 The next morning David wrote a letter to Joab and sent it with Uriah.
15 In the letter he wrote:
Put Uriah at the front of the fiercest fighting, then withdraw from him so that he is struck down and dies.
27 When the time of mourning ended, David had her brought to his house. She became his wife and bore him a son. However, the Lord considered what David had done to be evil.Commentary ~ Charles Spurgeon:
"At that hour David saw Bathsheba. We are never out of the reach of temptation. Both at home and abroad we are liable to meet with allurements to evil; the morning opens with peril, and the shades of evening find us still in jeopardy. They are well kept whom God keeps, but woe unto those who go forth into the world, or even dare to walk their own house unarmed.
Those who think themselves secure are more exposed to danger than any others. The armour-bearer of Sin is self-confidence. David should have been engaged in fighting the Lord's battles, instead of which he tarried at Jerusalem, and gave himself up to luxurious repose, for he arose from his bed at eventide. Idleness and luxury are the devil's jackals, and find him abundant prey. In stagnant waters noxious creatures swarm, and neglected soil soon yields a dense tangle of weeds and briars.When I see the King of Israel sluggishly leaving his couch at the close of the day, and falling at once into temptation, let me take warning, and set holy watchfulness to guard the door. Is it possible that the king had mounted his housetop for retirement and devotion? If so, what a caution is given us to count no place, however secret, a sanctuary from sin! While our hearts are so like a tinder-box, and sparks so plentiful, we had need use all diligence in all places to prevent a blaze. Satan can climb housetops, and enter closets, and even if we could shut out that foul fiend, our own corruptions are enough to work our ruin unless grace prevent.
Reader, beware of evening temptations. Be not secure. The sun is down but sin is up. We need a watchman for the night as well as a guardian for the day. O blessed Spirit, keep us from all evil this night. Amen."