1At the return of the year, at the time when kings go out, David sent Joab and his servants with him, and all Israel; and they destroyed the children of Ammon and besieged Rabbah. But David stayed at Jerusalem. 2At evening, David arose from his bed and walked on the roof of the king’s house. From the roof, he saw a woman bathing, and the woman was very beautiful to look at. 3David sent and inquired after the woman. One said, “Isn’t this Bathsheba, the daughter of Eliam, Uriah the Hittite’s wife?”
4David sent messengers, and took her; and she came in to him, and he lay with her (for she was purified from her uncleanness); and she returned to her house. 5The woman conceived; and she sent and told David, and said, “I am with child.”
6David sent to Joab, “Send me Uriah the Hittite.” Joab sent Uriah to David. 7When Uriah had come to him, David asked him how Joab did, and how the people fared, and how the war prospered. 8David said to Uriah, “Go down to your house and wash your feet.” Uriah departed out of the king’s house, and a gift from the king was sent after him. 9But Uriah slept at the door of the king’s house with all the servants of his lord, and didn’t go down to his house. 10When they had told David, saying, “Uriah didn’t go down to his house,” David said to Uriah, “Haven’t you come from a journey? Why didn’t you go down to your house?”
11Uriah said to David, “The ark, Israel, and Judah, are staying in tents; and my lord Joab and the servants of my lord are encamped in the open field. Shall I then go into my house to eat and to drink, and to lie with my wife? As you live, and as your soul lives, I will not do this thing!”
12David said to Uriah, “Stay here today also, and tomorrow I will let you depart.” So Uriah stayed in Jerusalem that day and the next day. 13When David had called him, he ate and drank before him; and he made him drunk. At evening, he went out to lie on his bed with the servants of his lord, but didn’t go down to his house. 14In the morning, David wrote a letter to Joab and sent it by the hand of Uriah. 15He wrote in the letter, saying, “Send Uriah to the forefront of the hottest battle, and retreat from him, that he may be struck and die.”
16When Joab kept watch on the city, he assigned Uriah to the place where he knew that valiant men were. 17The men of the city went out and fought with Joab. Some of the people fell, even of David’s servants; and Uriah the Hittite died also. 18Then Joab sent and told David all the things concerning the war; 19and he commanded the messenger, saying, “When you have finished telling all the things concerning the war to the king, 20it shall be that, if the king’s wrath arise, and he asks you, ‘Why did you go so near to the city to fight? Didn’t you know that they would shoot from the wall? 21Who struck Abimelech the son of Jerubbesheth? Didn’t a woman cast an upper millstone on him from the wall, so that he died at Thebez? Why did you go so near the wall?’ then you shall say, ‘Your servant Uriah the Hittite is also dead.’”
22So the messenger went, and came and showed David all that Joab had sent him for. 23The messenger said to David, “The men prevailed against us, and came out to us into the field; and we were on them even to the entrance of the gate. 24The shooters shot at your servants from off the wall; and some of the king’s servants are dead, and your servant Uriah the Hittite is also dead.”
25Then David said to the messenger, “Tell Joab, ‘Don’t let this thing displease you, for the sword devours one as well as another. Make your battle stronger against the city, and overthrow it.’ Encourage him.”
26When Uriah’s wife heard that Uriah her husband was dead, she mourned for her husband. 27When the mourning was past, David sent and took her home to his house, and she became his wife and bore him a son. But the thing that David had done displeased Yahweh.
Bathsheba was originally the wife of Uriah and later became the wife of David and the mother of Solomon. While Uriah was away on military duty, David seduced Bathsheba. To cover up the ensuing pregnancy, David summoned Uriah from the battlefield, pretending to seek an update on the army's progress, and tried to persuade him to go home and sleep with Bathsheba. However, Uriah, adhering to ritual abstinence, refused. In desperation, David arranged for Uriah to be placed on the front lines, where he was killed. After Uriah's death, David married Bathsheba.
The prophet Nathan denounced this marriage and foretold the death of Bathsheba's child, which came to pass. Their second child, Solomon, was favored by God and eventually succeeded David as king instead of his older half-brother Adonijah. When Adonijah sought to marry Abishag the Shunammite, he asked Bathsheba to mediate the request to Solomon. Bathsheba conveyed the request, but Solomon denied it and executed Adonijah for his audacity. References: 2 Sam 11:2-12:25; 1 Kings 1:11-31; 2:13-25; 1 Chronicles 3:5; Ps 51.
Bathsheba does appear in the genealogy of Jesus but is not mentioned by name: "Matt 1:6 Jesse became the father of King David. David the king became the father of Solomon by her who had been Uriah’s wife." See the discussion in Women in the Genealogy of Jesus (1:3-6),