We elucidate the configuration of the tentorium and the sclerites of the hypopharynx–prementum complex in selected spore- (pollen-) and non-spore-feeding Aleocharinae (Staphylinidae) by presenting the first comparative 3D reconstructions of these structures for 19 staphylinoid beetle species (six outgroups, 13 Aleocharinae). General organization of the tentorium follows the groundplan previously proposed for adult Staphylinidae, although some taxa have reduced or lost the dorsal (all Aleocharinae studied, Agathidium mandibulare [Leiodidae]) or anterior (Omalium rivulare [Omaliinae], Anotylus sculpturatus [Oxytelinae]) tentorial arms. All species investigated have premental and hypopharyngeal sclerites that are partly homologizable across taxa. We clarified that Musculus praementopalpalis externus originates from the premental sclerite, resolving its unclear origin reported in our previous publications. Eight of 13 investigated Aleocharinae species are spore/pollen feeders, six obligatorily. Three of these six (Eumicrota, Gyrophaena fasciata, G. gentilis) have grinding pseudomolae and a fully developed hypopharyngeal suspensorium with posterior bridge and anterior elongations; the remaining three (Oxypoda, Pagla, Polylobus) lack pseudomolae and suspensorial bridge, but have the suspensorium elongated anteriorly. The dorsolateral side of the hypopharyngeal sclerite interacts with the pseudomola. Obligate sporophagy/pollinivory apparently arose at least three times in Aleocharinae, not always involving the pseudomola–hypopharynx grinding mechanism.