What does Matthew 6:24 mean?

Matthew 6:24 KJV
No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve God and mammon.

Matthew 6:24 MKJV
No one can serve two masters. For either he will hate the one and love the other, or else he will hold to the one and despise the other. You cannot serve God and mammon.

Matthew 6:24 NKJV
“No one can serve two masters; for either he will hate the one and love the other, or else he will be loyal to the one and despise the other. You cannot serve God and mammon.

Matthew 6:24 KJV 2000
No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. You cannot serve God and mammon.

Interlinear KJV

No man /oudeis/ can /dunamai/ serve /douleuo/ two /duo/ masters: /kurios/ for /gar/ either /e/ he will hate /miseo/ the one, /heis/ and /kai/ love /agapao/ the other; /heteros/ or else /e/ he will hold /antechomai/ to the one, /heis/ and /kai/ despise /kataphroneo/ the other. /heteros/ Ye cannot /ou/ /dunamai/ serve /douleuo/ God /theos/ and /kai/ mammon. /mammonas/

Albert Barnes’ Commentary

Verse 24. No man can serve two masters, etc. Christ proceeds to illustrate the necessity of laying up treasures in heaven from a well- known fact, that a servant cannot serve two masters at the same time. His affections and obedience would be divided, and he would fail altogether in his duty to one or the other. One he would love, and the other hate. To the interests of one he would adhere, the other he would neglect. This is a law of human nature. The supreme affections can be fixed on only one object. So, says Jesus, the servant of God cannot at the same time obey him and be avaricious, or seek treasures supremely on earth. One interferes with the other, and one will be, and must be surrendered.

Mammon. Mammon is a Syriac word, a name given to an idol worshipped as the god of riches. It has the same meaning as Plutus among the Greeks. It is not known that the Jews ever formally worshipped this idol, but they used the word to denote wealth. The meaning is, ye cannot serve the true God, and at the same time be supremely engaged in obtaining the riches of this world. One must interfere with the other. See Lu 16:9-11.

{i} “two masters” Lu 16:13 {k} “cannot serve God and mammon” Ga 1:10; 2 Ti 4:10; Jas 4:4