Jehovah led David to repentance primarily through the prophet Nathan. After David committed adultery with Bathsheba and orchestrated the death of her husband, Uriah, to cover up his actions, God sent Nathan to confront David. Nathan used a parable about a rich man who took a poor man's only lamb to illustrate David's sin, prompting David to recognize his wrongdoing. Upon realizing the gravity of his actions, David repented deeply for his sins.
This encounter is detailed in 2 Samuel 12, where Nathan boldly confronts David, leading him to acknowledge his sin. David's repentance is expressed in Psalm 51, a heartfelt plea for mercy and forgiveness, where he seeks to restore his relationship with God after his grievous mistakes. Through this process, Jehovah's guidance led David to reflect on his actions and genuinely seek repentance.