Hermit crabs of the family Coenobitidae comprise the land hermit crabs, with 16 Coenobita species, and the coconut crab Birgus latro. They are terrestrial but spend their marine life as planktonic larvae. Some coenobitid crabs are widely distributed in the Indo‐West Pacific region, and some species occupy narrower ranges. To improve our knowledge of coenobitid crab speciation and geographical distribution patterns, we examined the phylogenetic relationship between Coenobita purpureus, which has a narrow distribution in the Northwestern Pacific, and its more widely distributed coenobitids including B. latro, Coenobita brevimanus, Coenobita cavipes, Coenobita perlatus, Coenobita rugosus and Coenobita violascens based on the mtDNA cytochrome c oxidase subunit I (COI) and 16S rDNA genes. We also assessed the phylogeography of Co. purpureus populations based on the COI gene. Our phylogenetic and phylogeographical analyses revealed that (i) Co. purpureus clustered with Co. rugosus and (ii) the Co. purpureus population in the Ogasawara Islands was genetically distinct from those in other regions, which showed genetic panmixia. It has been hypothesized that Co. purpureus evolved in the isolated landmasses of the Ryukyu region during the Pliocene, and that its population expanded and colonized the Ogasawara Islands in the late Pleistocene. Further phylogeographical studies on Coenobita species with relatively narrow distributions coupled with characterization of their phylogenetic relationships with widely distributed congeners will advance our knowledge of the speciation and geographical distribution history of coenobitid crabs.