Instead of having an extended discussion about what it means to truly keep the commandments, Jesus focused on the specific issue that revealed this man’s problem. He still lacked one thing: He loved riches more than he loved God, thus breaking the first and most important commandment (12:29–30; Exodus 20:3; Deuteronomy 6:5).
Entering the kingdom of God requires repentance (Mark 1:15; 6:12). Jesus helped this man to understand exactly what repentance meant for him. He did not need, as he might have thought, to attain a higher level of personal righteousness. He needed to enter God's kingdom through repentance and deep love for God to gain eternal life. He must deny himself and love God first by giving away his money (8:34).
For other commands with a negative (sell everything) and a positive (follow Me) element, see 1:15, 18, 20; 10:28; see also Acts 2:38; 20:21.
The command Jesus gave to the rich man was not a strict rule for everyone entering the kingdom of God, but was specific to his situation. It teaches that nothing should come before God. Repentance requires removing anything we place above God (Mark 1:15; 6:12).