The Coleoptera Cerambycidae (longicorn beetles) use wood under different states (living healthy, freshly snapped, completely rot, etc.) in a species-specific manner for their larval diet. Larvae of some Cerambycidae groups have mycetomes, accessory organs associated with the midgut that harbor fungal symbiont cells. The symbionts are thought to improve nutrient conditions; however, this has yet to be shown experimentally. To deduce the evolutionary history of this symbiosis, we investigated the characteristics of the mycetomes in the larvae of longicorn beetles collected in Japan. Lepturinae, Necydalinae, and Spondylidinae are the only groups that possess mycetomes, and these three groups' mycetomes and corresponding fungal cells exhibit different characteristics between the groups. However, the phylogenetic relationship of symbiont yeasts does not coincide with that of the corresponding longicorn beetle species, suggesting they have not co-speciated. The imperfect vertical transmission of symbiont yeasts from female to offspring is a mechanism that could accommodate the host-symbiont phylogenetic incongruence. Some Lepturinae species secondarily lost mycetomes. The loss is associated with their diet choice, suggesting that different conditions between feeding habits could have allowed species to discard this organ. We found that symbiont fungi encapsulated in the mycetomes are dispensable for larval growth if sufficient nutrients are given, suggesting that the role of symbiotic fungi could be compensated by the food larvae take. Aegosoma sinicum is a longicorn beetle classified to the subfamily Prioninae, which does not possess mycetomes. However, this species contains a restricted selection of yeast species in the larval gut, suggesting that the symbiosis between longicorn beetles and yeasts emerged before acquiring the mycetomes.