Deuteronomy 17:20

20 so that he will not think he is better than his kinsmen; and so that he will not turn aside either to the right or to the left from the mitzvah. In this way he will prolong his own reign and that of his children in Isra'el.

Deuteronomy 17:20 Meaning and Commentary

Deuteronomy 17:20

That his heart be not lifted up above his brethren
On account of his office, the dignity of it, considering that he was subject to the law of God, and accountable to the Lord for all his actions:

and that he turn not aside from the commandment, to the right hand or
to the left;
not in the least deviate from the law of God in the whole of his conduct, and particularly in the exercise of his kingly office:

to the end that he may prolong his days in his kingdom;
ruling well according to the laws of God being the way to rule long:

he and his children in the midst of Israel;
this shows, as Jarchi observes, that if his son was fit for the kingdom, he was to be preferred to any other man; for though it was elective, yet to be continued in the same family, provided they walked in the ways of the Lord, and observed his laws.

Deuteronomy 17:20 In-Context

18 "When he has come to occupy the throne of his kingdom, he is to write a copy of this Torah for himself in a scroll, from the one the cohanim and L'vi'im use.
19 It is to remain with him, and he is to read in it every day, as long as he lives; so that he will learn to fear ADONAI his God and keep all the words of this Torah and these laws and obey them;
20 so that he will not think he is better than his kinsmen; and so that he will not turn aside either to the right or to the left from the mitzvah. In this way he will prolong his own reign and that of his children in Isra'el.
Complete Jewish Bible Copyright 1998 by David H. Stern. Published by Jewish New Testament Publications, Inc. All rights reserved. Used by permission.