“…And he did what was right in the sight of the Lord, but not with a loyal heart…

2 Chronicles 25:2”

The word loyalty what does that mean? what does it mean to have a loyal heart

First thought that crossed my mind was the possibility of being obedient without being loyal. Loyalty is the ability to stand by a person in the good times and bad so not obedience by convenience but event when it isn’t. 
So some context to the verse, we are currently being told about Amaziah who was one of the descendants of Solomon, current king of Judah. The kingdom had gone through many cycles of kings with many of them who had their hearts turned away from God, far away from the example of David, who was a man after God’s own heart. Joash was Amaziah’s father and was the 1st of the Kings of Judah after many years who had a heart for God and had done certain things to bring the people back to serve the Lord their God (2 Chronicles 24). With the right example, Amaziah must have been taught the obedience to God. This is evident of the fact that God sees our hearts, our intents and our motives
“For the eyes of the LORD run to and fro throughout the whole earth, to show Himself strong on behalf of those whose heart is loyal to Him. In this you have done foolishly; therefore from now on you shall have wars.”

‭‭II Chronicles‬ ‭16:9‬ ‭NKJV‬‬
Are we only obedient when it is convenient for us or are we willing to serve and seek after God’s leading even when things don’t seem to be going exactly the way we want?