The male sex pheromone of the longicorn beetle, Xylotrechus pyrrhoderus pyrrhoderus Bates (Cerambycidae: Tribe Clytini) plays an important role in attracting females. This pheromone is produced by the pheromone gland located in the prothorax. However, the detailed structure and underlying developmental process of this gland are still unknown. We investigated the gland structure by using histological analysis and confirmed that the gland consists of the following parts: gland cell mass, a unique spherical space in the cuticle layer, and ductules connecting the gland cells with the spherical space and conducting canals to the outer opening. The gland structure first appeared male-specific in the late pupal stage, during which the epidermal cells began depositing the exocuticle; the development of the gland was completed after adult emergence. Furthermore, we verified the structural equivalents of the X. p. pyrrhoderus male pheromone gland in 11 species of 2 tribes, Clytini and Anaglyptini. The glands of these insects could be classified into four types on the basis of the absence or presence of the spherical space and the division of the gland cell mass layer. Most noteworthy, all the species with the spherical space and division-type gland were restricted to the Xylotrechus clade, as inferred from the molecular phylogenetic analysis. These results suggest that Clytini and Anaglyptini species share a fundamental process of male pheromone gland development, and that the Japanese Xylotrechus species might have established their current status by developing distinct structural features in the male pheromone gland.