What does the Bible mean when it says that David was a man after God's own heart? This can be answered in several ways, but most of all, as a young man, the Word says that David sought the Lord before any move that he made.
When David went out on the battlefield to defeat Goliath, the Philistine who had cursed the God of Israel, David said to him, "I come to you in the name of the LORD of hosts, the God of the armies of Israel, who you have defied. This day the LORD will deliver you into my hand, and I will strike you down and cut off your head" (1 Samuel 17:45-46). For David, this battle was the Lord's battle and he was just an instrument in God's hands.
After David found out that King Saul had died, "...David inquired of the LORD, 'Shall I go up into any of the cities of Judah?' And the LORD said to him, 'Go up.' David said, 'To which shall I go up?' And He said, 'To Hebron'" (2 Samuel 2:1). Even a question as simple as where to go next was from the heart of David. He would not move without inquiring of God for directions. Time and time again, we read of David asking God what to do next confident that God would direct him.
If you or I were on a battlefield going up against a giant of an enemy, surely we would ask God what to do next. But, if we are going on a trip, or even moving across town or to another city, would we bother God with such a simple question as whether we should make a move or travel down the road on a short trip or on a vacation? David would not make a move without God for he was confident that only God could direct every step...he did not want to make a move lest he stumble.
Yes, David was a man who sought the direction of God..."a man after God's own heart." Yet we all know that David was not perfect. Looking back on his life, we find that he failed miserably many times. David knew God's rules about moving the "Ark"...how it must be moved by Levite priests using two poles and to be carried on their shoulders. Second Samuel 6 tells us of David's attempt to move the Ark to Jerusalem but he did not follow God's law concerning the moving of the Ark, nor did he inquire of God whether to move it or not. The result was that a man named Uzzah lost his life.
We also know that David committed adultery with Bathsheba and had her husband killed to cover up his sin. Against God's law (Deuteronomy 17:17) David took numerous wives and concubines, yet in the end, as flawed and imperfect as he was, David still was called "a man after God's own heart."
When Samuel revealed to King Saul that God had rejected Saul as king...that he would not have a royal dynasty, the Scripture tells us that Samuel said, "The LORD has sought out a man after His own heart, and the LORD has commanded him to be prince over His people" (1 Samuel 13:14). That man would be David.
The big difference between David and Saul was that when God confronted David with his sin, David's heart was broken and he openly grieved over his sin...not so with Saul.
R.C. Sproul writes: “In the Psalms, we see the heart of a penitent unveiled and in that I think we see most clearly the greatness of David the Great. If you read Psalm 51 and read it carefully and thoughtfully, that Psalm will reveal more than anything else in the history of David why David was called a man after God’s own heart. Because here it reveals the broken heart of a sinful man who sees his sin clearly.”
What does the heart of a man (or woman) look like who is known as "a man after God's own heart?" It is one which recognizes their failures...their sins, confesses them daily to God, and then moves on in a direction that honors God as of first importance. It is the desire to glorify God in his or her every move.
Chuck Swindoll says, "What does it mean to be a person after God's own heart? It means your life is in harmony with the Lord. What is important to Him is important to you. What burdens Him burdens you. When He says, "Go the the right," you go to the right. When He says, "Stop that in your life," you stop it. When He says, "This is wrong and I want you to change," you come to terms with it because you have a heart for God. That's bottom-line, biblical Christianity."
For the person who desires God's will in every aspect of their life, Jesus said, "Truly, truly I say to you, whatever you ask of the the Father in my name, He will give it to you" (John 16:23). This simply means that if you desire what God desires, He will direct you. Then you too, like King David, will be "a person after God's own heart!"