Review the previous chapters of Mesilat Yisharim about tahara, and you will find Rambam's shita. He described this purity as definitionally "doing it for the sake of heaven":
וּמִי שֶׁהוּא עוֹבֵד ה' בֶּאֱמֶת, לֹא יִסְתַּפֵּק בָּזֶה בְּמֻעָט
וְלֹא יִתְרַצֶּה לָקַחַת כֶּסֶף מְעֹרָב בְּסִיגִים וּבְדִילִים,
דְּהַיְנוּ, עֲבוֹדָה מְעֹרֶבֶת בִּפְנִיּוֹת לֹא טוֹבוֹת, אֶלָּא
הַזַּךְ וְהַטָּהוֹר כָּרָאוּי, וְאָז יִקָּרֵא עוֹשֶׂה מִצְוָה
כְּמַאֲמָרָהּ, שֶׁעָלָיו אָמְרוּ זַ"ל (שבת ס"ג א): כָּל הָעוֹשֶׂה
מִצְוָה כְּמַאֲמָרָהּ אֵין מְבַשְּׂרִין אוֹתוֹ בְּשׂוֹרוֹת רָעוֹת.
וְכֵן אָמְרוּ זַ"ל (נדרים ס"ב א): עֲשֵׂה דְּבָרִים לְשֵׁם פָּעֳלָם
וְדַבֵּר בָּהֶם לִשְׁמָן.
He who is truly a servant of G-d, will not be satisfied with serving
Him minimally. He will not be content to take silver mixed with dross
and lead, that is, divine service mixed with impure motivations, but
rather only with the clean and pure as is befitting. Then he will be
called "one who does a mitzva as it is stated", of which our sages of
blessed memory said: "whoever does a mitzva as it is stated, will
receive no evil tidings" (Shab.63a). Likewise they said: "do [good]
deeds for the sake of their Maker, and speak of them for their own
sake" (Nedarim 62a).
And what is this motivation that is clean and pure? Serving Hashem because it is the right thing to do i.e. because it is true:
וְעִנְיָנָהּ שֶׁלֹּא יַנִּיחַ הָאָדָם מָקוֹם לַיֵּצֶר
בְּמַעֲשָׂיו, אֶלָּא יִהְיוּ כָּל מַעֲשָׂיו עַל צַד הַחָכְמָה
וְהַיִּרְאָה וְלֹא עַל צַד הַחֵטְא וְהַתַּאֲוָה.
Its matter is for a man to not leave any room in one's deeds for the
evil inclination, but rather, that all of his deeds be from the
side of wisdom and fear of G-d, and not from the side of sin and
lust.
I.e. pure motivations, based on the truth of the value of the actions themselves, and the One Who commands them.
כִּי אֵין דַּי לָאָדוֹן בָּרוּךְ הוּא בַּמַּעֲשִׂים לְבַדָּם
שֶׁיִּהְיוּ מַעֲשֵׂי מִצְוָה, אֶלָּא הָעִקָּר לְפָנָיו שֶׁהַלֵּב
יִהְיֶה טָהוֹר לְכַוֵּן בָּהּ לַעֲבוֹדָה אֲמִתִּית.
For to the Master of the world, the deeds alone are not sufficient,
namely, to perform an act of mitzva. Rather, the primary importance
before Him is that the heart be pure, so that its intent is to true
service.
The introduction to chapter 19, as you brought, explains that there is a level above this, and that is not to do it just because it is right, true and wise, but also because you love Hashem, with a simple love that seeks only to please Him. This is yet another level of "lishma", which I believe the Rambam covers in the same halachot, e.g.:
וּמַעֲלָה זוֹ הִיא מַעֲלָה גְּדוֹלָה מְאֹד וְאֵין כָּל חָכָם זוֹכֶה
לָהּ. וְהִיא מַעֲלַת אַבְרָהָם אָבִינוּ שֶׁקְּרָאוֹ הַקָּדוֹשׁ
בָּרוּךְ הוּא אוֹהֲבוֹ לְפִי שֶׁלֹּא עָבַד אֶלָּא מֵאַהֲבָה
This is a very high level which is not merited by every wise man. It
is the level of our Patriarch, Abraham, whom God described as, "he who
loved Me," for his service was only motivated by love.