In Psalm 119:57 the Psalmist writes: “Yahweh is my portion; I have promised to keep Your words.” Here we see the key to the kind of obedience that God wants from us.
We are to obey Him, like the Psalmist did, because He is our “portion.” Psalm 16:5 says: “Yahweh is the portion of my inheritance and my cup.” He is saying that God is his greatest treasure and joy. Others may delight in an inheritance of money, land, business, etc. — but God HIMSELF is the “inheritance” that he delights in. And it is from that kind of relationship with God that he obeys: “Yahweh is my portion; I have promised to keep Your words.”
This reminds us that our obedience to God is not to be a drudgery, but is to flow from our commitment to Him as our Lord, God, and greatest joy. It is to spring from our love for Him as our portion. It is not that we feel like we just “have” to obey Him; rather it is that we don’t want any disobedience or sin to come between us, which would hinder our relationship with Him. This is just what Jesus told us in the New Testament: “If you love Me, you will keep My Commandments.” (John 14:15) As God’s children we are not to have “mere” obedience — but a better obedience that springs from love.