The biblical story of David and Bathsheba can be found in the Old Testament (2 Samuel 11: 2-17).
King David spied on Bathsheba while she was bathing. She was the wife of Uriah the Hittite, a member of the King's army. David made her pregnant and then wrote to Uriah's commander, telling him to put Uriah in the fiercest part of the battle. This order was carried out and Uriah was killed. David married Bathsheba, but their child did not survive.