Caterpillars of many lycaenid butterflies are tended by ants that offer protection from predators and parasitoids. Specialized structures such as glands, ciliary organs and chitinous ornamentation in caterpillars play key roles in the underlying tactile, acoustic, and chemical communication between caterpillars and ants. Although the ecological, evolutionary, and behavioural aspects of these interactions are well studied, the mechanisms (i.e., the functional morphology) that drive the specialized interactive organs are poorly characterized. We used advanced X-ray microtomography (MicroCT) to delineate internal, native morphology of specialized larval dew patches, nectar glands, and tactile ciliary organs that mediate interactions between Crematogaster ants and caterpillars of the obligate myrmecophilous Apharitis lilacinus butterfly. Our non-destructive MicroCT analysis provided novel 3-D insights into the native structure and positions of these specialized organs in unmatched detail. This analysis also suggested a functional relationship between organ structures and surrounding muscles and nervation that operate the glands and tactile organs, including a 'lasso bag' control mechanism for dew patches and muscle control for other organs. This provided a holistic understanding of the organs that drive very close caterpillar-ant interactions. Our MicroCT analysis opens a door for similar structural and functional analysis of adaptive insect morphology.