I think the Rambam is quite clear in Hilkhos Teshuvah 8:5. We do get a hint in 8:1, "פִרְעוֹן הָרְשָׁעִים הוּא שֶׁלֹּא יִזְכּוּ לְחַיִּים אֵלּוּ אֶלָּא יִכָּרְתוּ וְיָמוּתוּ. -- the payment of the wicked is, that they will not share in such life, but will suffer excision and eternal death."
But in halakhah 5, the Rambam states that all the prophetic discussion of what we call "gehennom"* is a metaphoric description of ceasing to exist. To quote:
הַנְּקָמָה שֶׁאֵין נְקָמָה גְּדוֹלָה מִמֶּנָּה שֶׁתִּכָּרֵת הַנֶּפֶשׁ וְלֹא תִּזְכֶּה לְאוֹתָן הַחַיִּים שֶׁנֶּאֱמַר (במדבר טו:לא) "הִכָּרֵת תִּכָּרֵת הַנֶּפֶשׁ הַהִיא עֲוֹנָהּ בָּהּ". וְזֶה הָאֲבַדּוֹן הוּא שֶׁקּוֹרִין אוֹתוֹ הַנְּבִיאִים דֶּרֶךְ מָשָׁל "בְּאֵר שַׁחַת" וַ"אֲבַדּוֹן" וְ"תָפְתֶּה" וַ"עֲלוּקָה" וְכָל לְשׁוֹן כְּלָיָה וְהַשְׁחָתָה קוֹרְאִין לוֹ. לְפִי שֶׁהִיא הַכְּלָיָה שֶׁאֵין אַחֲרֶיהָ תְּקוּמָה וְהַהֶפְסֵד שֶׁאֵינוֹ חוֹזֵר לְעוֹלָם:
The vengeance, than which there is none greater is, that the soul will be cut off and will obtain no share in that life, even as it is said: "That soul shall be utterly cut off; his iniquity shall be upon him" (Bamidbar 15:31). And this is what the prophets call figuratively by different names, such as, "pit of destruction", "burning flame", "leech", and by every word which means decay and destruction is it called, because it is an expression of terminating decay from which there is no regeneration and a loss which remains forever un-returned.
Similarly, there is tangenial mention in Hilkhos Teshuvah 3:6. In introducing his list of heretics, the Rambam writes:
וְאֵלּוּ הֵן שֶׁאֵין לָהֶן חֵלֶק לָעוֹלָם הַבָּא אֶלָּא נִכְרָתִים וְאוֹבְדִין וְנִדּוֹנִין עַל גֹּדֶל רִשְׁעָם וְחַטָּאתָם לְעוֹלָם וּלְעוֹלְמֵי עוֹלָמִים.
And these are the people who have no part toward the World to Come. Rather, they are cut off and destroyed, and are judged on the greatness of their evil and their sin for all eternity.
Heretics are "cut off and destroyed". So then how does the Rambam continue to say that are they judged for all eternity? Because they do not exist for the rest of eternity. Note the Rambam does not say they will be punished for all eternity, but that "they are judged ... for all eternity". The judgment of being cut off is a decision of eternal consequence.
Which makes sense thinking about it from the Rambam's first principles. In his worldview (c.f. 8:1), the reward of the World to Come is inherent in the World to Come containing fewer barriers between the soul (the term used is nefesh, which likely matters) and the Creator than we have in this world.
In his commentary on the Mishnah, introduction to Pereq Cheileq (Sanhedrin ch. 10 or 11), the Rambam cites Reish Laqish (Nedarim 8b, Avodah Zara 3b-4a), who says:
אין גיהנם לעתיד לבא אלא הקדוש ברוך הוא מוציא חמה מנרתיקה ומקדיר רשעים נידונין בה וצדיקים מתרפאין בה ... דכתיב (מלאכי ג:יט) "[כִּֽי]־הִנֵּ֤ה הַיּוֹם֙ בָּ֔א בֹּעֵ֖ר כַּתַּנּ֑וּר וְהָי֨וּ כָל־זֵדִ֜ים וְכָל־עֹשֵׂ֤ה רִשְׁעָה֙ קַ֔שׁ וְלִהַ֨ט אֹתָ֜ם הַיּ֣וֹם הַבָּ֗א אָמַר֙ ה' .צְבָקוֹת אֲשֶׁ֛ר לֹא־יַעֲזֹ֥ב לָהֶ֖ם שֹׁ֥רֶשׁ וְעָנָֽף" -- לא שורש בעולם הזה ולא ענף לעולם הבא.
There is no gehennom in the future-to-come. Rather HaQadosh Barukh Hu takes the sun out of its sheath, and heats with it. Wicked people are judged by it, and righteous people are healed by it. ... "For, here! The era is coming, it burns as a furnace; and all the proud, and all that do wickedness, shall be stubble; and the day that comes shall set them ablaze, said the Hashem Tzevaqos, that it shall leave them neither root nor branch." (Malachi 3:19) -- No root will remain [of the wicked] in this world, and no branch for the World to Come.
(* The Rambam doesn't discuss this that I know of, but using the name "gehennom" is definitely metaphoric. It is named for Gei Ben Hinom -- the Valley of the son of Hinnom, a place outside Yerushalayim where the Canaanites practiced child sacrifice. Today it's between the Old City and the Artist Colony and boasts a venue for Rock concerts. Make of that what you will <grin>.)