The molluscan class Gastropoda includes over 5,000 parasitic species whose evolutionary origins remain poorly understood. Marine snails of the genus Caledoniella (Caledoniellidae) are obligate parasites that live on the abdominal surface of the gonodactylid mantis shrimps. They have highly modified morphological characteristics specialized to the ectoparasitic lifestyle that make it difficult to infer their close relatives, thereby posing a question about their current systematic position in the superfamily Vanikoroidea. In the present study, we performed molecular phylogenetic analyses using three nuclear and three mitochondrial gene sequences to unveil the phylogenetic position of these enigmatic snails. The resulting trees recovered Caledoniella in the superfamily Truncatelloidea and within a subclade of commensal species that live on the burrow wall of marine benthic invertebrates. More specifically, Caledoniella formed the sister clade to a commensal snail species living in mantis-shrimp burrows and they collectively were sister to Sigaretornus planus (formerly in the family Tornidae or Vitrinellidae), a commensal living in echiuran burrows. This topology suggests that the species of Caledoniella achieved their ectoparasitic mode of life through the following evolutionary pathway: (1) invasion into the burrows of benthic invertebrates, (2) specialization to mantis shrimps, and (3) colonization of the host body surface from the host burrow wall with the evolution of the parasitic nature. The final step is likely to have been accompanied by the acquisition of a sucker on the metapodium, the loss of the radula and operculum, and the formation of monogamous pair bonds. The present molecular phylogeny also suggested parallel evolution of planispiral shells in a subclade of Truncatelloidea and enabled us to newly redefine the families Caledoniellidae, Elachisinidae, Teinostomatidae, Tornidae and Vitrinellidae.