But now thy kingdom shall not continue
That is, in his family, nor in his tribe, but be removed to another:
the Lord hath sought him a man after his own heart:
who was David; though as yet Samuel knew him not, he knew by divine revelation that there was another one chosen, to whom the kingdom would be given; a man every way agreeable to the will of God, and who would fulfil his will, though he knew not particularly who he was:
and the Lord hath commanded him to be captain over his people;
that is, had appointed him to be king over Israel. God's decrees have the force of a law in them, and must be fulfilled; and cannot be resisted so as to be frustrated:
because thou hast not kept that which the Lord hath commanded thee;
it matters not whether the thing commanded is greater or less, it is disobedience to the command that is the sin, and is resented: this might seem a small thing, since to offer the sacrifice was not criminal; but doing it before the time, a little before it should have been done, not waiting long enough for the prophet; yet it being against the command of God, or in neglect of it, it was sinful, and severely chastised; and the rather, that it might be an example to all succeeding kings how they offended, or broke the least of God's commandments; and this being the first king of Israel, he was made an example of to the rest.