The beetle family Scolytidae includes several groups having regular sib–mating and extremely female–biased sex ratios. Two such groups are known to include haplodiploid species: (i) the tribe Xyleborini and (ii) Coccotrypes and related genera within the tribe Dryocoetini. Relationships of these groups have been controversial. We analysed elongation factor 1–α (852 bp) and cytochrome oxidase 1 (1179 bp) sequences for 40 species. The most–parsimonious trees imply a single origin of haplodiploidy uniting Xyleborini (approximately 1200 species) and sib–mating Dryocoetini (approximately 160 species). The sister–group of the haplodiploid clade is the outcrossing genus Dryocoetes. The controversial genus Premnobius is outside the haplodiploid clade. Most haplodiploid scolytids exploit novel resources, ambrosia fungi or seeds, but a few have the ancestral habit of feeding on phloem. Thus, scolytids provide the clearest example of W. D. Hamilton's scenario for the evolution of haplodiploidy (life under bark leading to inbreeding and hence to female–biased sex ratios through haplodiploidy) and now constitute a unique opportunity to study diplodiploid and haplodiploid sister–lineages in a shared ancestral habitat. There is some evidence of sex determination by maternally inherited endosymbiotic bacteria, which may explain the consistency with which female–biased sex ratios and close inbreeding have been maintained.