Rambam opens by explaining that a person's character traits can drift to extremes and that the right path is the balanced mean. He then lays out a structured program for correcting traits like anger, pride, and desire.
הַדֶּרֶךְ הַיְשָׁרָה הִיא מִדָּה בֵּינוֹנִית שֶׁבְּכָל דֵּעָה וְדֵעָה מִכָּל הַדֵּעוֹת שֶׁיֵּשׁ לוֹ לָאָדָם. וְהִיא הַדֵּעָה שֶׁהִיא רְחוֹקָה מִשְּׁתֵּי הַקְּצָווֹת רִחוּק שָׁוֶה וְאֵינָהּ קְרוֹבָה לֹא לָזוֹ וְלֹא לָזוֹ. לְפִיכָךְ צִוּוּ חֲכָמִים הָרִאשׁוֹנִים שֶׁיְּהֵא אָדָם שָׁם דֵּעוֹתָיו תָּמִיד וּמְשַׁעֵר אוֹתָם וּמְכַוִּן אוֹתָם בַּדֶּרֶךְ הָאֶמְצָעִית כְּדֵי שֶׁיְּהֵא שָׁלֵם בְּגוּפוֹ. כֵּיצַד. לֹא יְהֵא בַּעַל חֵמָה נוֹחַ לִכְעֹס וְלֹא כְּמֵת שֶׁאֵינוֹ מַרְגִּישׁ אֶלָּא בֵּינוֹנִי. לֹא יִכְעֹס אֶלָּא עַל דָּבָר גָּדוֹל שֶׁרָאוּי לִכְעֹס עָלָיו כְּדֵי שֶׁלֹּא יֵעָשֶׂה כַּיּוֹצֵא בּוֹ פַּעַם אַחֶרֶת. וְכֵן לֹא יִתְאַוֶּה אֶלָּא לִדְבָרִים שֶׁהַגּוּף צָרִיךְ לָהֶן וְאִי אֶפְשָׁר לִהְיוֹת בְּזוּלָתָן כָּעִנְיָן שֶׁנֶּאֱמַר (משלי יג כה) "צַדִּיק אֹכֵל לְשֹׂבַע נַפְשׁוֹ". וְכֵן לֹא יִהְיֶה עָמֵל בְּעִסְקוֹ אֶלָּא לְהַשִּׂיג דָּבָר שֶׁצָּרִיךְ לוֹ לְחַיֵּי שָׁעָה כָּעִנְיָן שֶׁנֶּאֱמַר (תהילים לז טז) "טוֹב מְעַט לַצַּדִּיק". וְלֹא יִקְפֹּץ יָדוֹ בְּיוֹתֵר. וְלֹא יְפַזֵּר מָמוֹנוֹ אֶלָּא נוֹתֵן צְדָקָה כְּפִי מִסַּת יָדוֹ וּמַלְוֶה כָּרָאוּי לְמִי שֶׁצָּרִיךְ. וְלֹא יְהֵא מְהוֹלֵל וְשׂוֹחֵק וְלֹא עָצֵב וְאוֹנֵן אֶלָּא שָׂמֵחַ כָּל יָמָיו בְּנַחַת בְּסֵבֶר פָּנִים יָפוֹת. וְכֵן שְׁאָר דֵּעוֹתָיו. וְדֶרֶךְ זוֹ הִיא דֶּרֶךְ הַחֲכָמִים. כָּל אָדָם שֶׁדֵּעוֹתָיו דֵּעוֹת (בֵּינוֹנִית) [בֵּינוֹנִיּוֹת] מְמֻצָּעוֹת נִקְרָא חָכָם: וְכֵיצַד יַרְגִּיל אָדָם עַצְמוֹ בְּדֵעוֹת אֵלּוּ עַד שֶׁיִּקָּבְעוּ בּוֹ. יַעֲשֶׂה וְיִשְׁנֶה וִישַׁלֵּשׁ בַּמַּעֲשִׂים שֶׁעוֹשֶׂה עַל פִּי הַדֵּעוֹת הָאֶמְצָעִיּוֹת וְיַחֲזֹר בָּהֶם תָּמִיד עַד שֶׁיִּהְיוּ מַעֲשֵׂיהֶם קַלִּים עָלָיו וְלֹא יִהְיֶה בָּהֶם טֹרַח עָלָיו וְיִקָּבְעוּ הַדֵּעוֹת בְּנַפְשׁוֹ. וּלְפִי שֶׁהַשֵּׁמוֹת הָאֵלּוּ נִקְרָא בָּהֶן הַיּוֹצֵר וְהֵם הַדֶּרֶךְ הַבֵּינוֹנִית שֶׁאָנוּ חַיָּבִין לָלֶכֶת בָּהּ. נִקְרֵאת דֶּרֶךְ זוֹ דֶּרֶךְ ה'. וְהִיא שֶׁלִּמֵּד אַבְרָהָם אָבִינוּ לְבָנָיו שֶׁנֶּאֱמַר (בראשית יח יט) "כִּי יְדַעְתִּיו לְמַעַן אֲשֶׁר יְצַוֶּה" וְגוֹ'. וְהַהוֹלֵךְ בְּדֶרֶךְ זוֹ מֵבִיא טוֹבָה וּבְרָכָה לְעַצְמוֹ שֶׁנֶּאֱמַר (בראשית יח יט) "לְמַעַן הָבִיא ה' עַל אַבְרָהָם אֵת אֲשֶׁר דִּבֶּר עָלָיו":
The straight path: This [involves discovering] the midpoint temperament of each and every trait that man possesses [within his personality.] This refers to the trait which is equidistant from either of the extremes, without being close to either of them. Therefore, the early Sages instructed a man to evaluate his traits, to calculate them and to direct them along the middle path, so that he will be sound {of body}. For example: he should not be wrathful, easily angered; nor be like the dead, without feeling, rather he should [adopt] an intermediate course; i.e., he should display anger only when the matter is serious enough to warrant it, in order to prevent the matter from recurring. Similarly, he should not desire anything other than that which the body needs and cannot exist without, as [Proverbs 13:25] states: "The righteous man eats to satisfy his soul." Also, he shall not labor in his business except to gain what he needs for immediate use, as [Psalms 37:16] states: "A little is good for the righteous man." He should not be overly stingy nor spread his money about, but he should give charity according to his capacity and lend to the needy as is fitting. He should not be overly elated and laugh [excessively], nor be sad and depressed in spirit. Rather, he should be quietly happy at all times, with a friendly countenance. The same applies with regard to his other traits. This path is the path of the wise. Every man whose traits are intermediate and equally balanced can be called a "wise man." How can one train himself to follow these temperaments to the extent that they become a permanent fixture of his [personality]? He should perform - repeat - and perform a third time - the acts which conform to the standards of the middle road temperaments. He should do this constantly, until these acts are easy for him and do not present any difficulty. Then, these temperaments will become a fixed part of his personality. Since the Creator is called by these terms and they make up the middle path which we are obligated to follow, this path is called "the path of God." This is [the heritage] which our Patriarch Abraham taught his descendants, as [Genesis 18:19] states: "for I have known Him so that he will command his descendants...to keep the path of God." One who follows this path brings benefit and blessing to himself, as [the above verse continues]: "so that God will bring about for Abraham all that He promised."