Divergent selection between environments can result in changes to the behavior of an organism. In many insects, volatile compounds are a primary means by which host plants are recognized and shifts in plant availability can result in changes to host preference. Both the plant substrate and microorganisms can influence this behavior, and host plant choice can have an impact on the performance of the organism. In Drosophila mojavensis, four geographically isolated populations each use different cacti as feeding and oviposition substrates and identify those cacti by the composition of the volatile odorants emitted. Behavioral tests revealed D. mojavensis populations vary in their degree of preference for their natural host plant. Females from the Mojave population show a marked preference for their host plant, barrel cactus, relative to other cactus choices. When flies were given a choice between cacti that were not their host plant, the preference for barrel and organ pipe cactus relative to agria and prickly pear cactus was overall lower for all populations. Volatile headspace composition is influenced by the cactus substrate, microbial community, and substrate‐by‐microorganism interactions. Differences in viability, developmental time, thorax length, and dry body weight exist among populations and depend on cactus substrate and population‐by‐cactus interactions. However, no clear association between behavioral preference and performance was observed. This study highlights a complex interplay between the insect, host plant, and microbial community and the factors mediating insect host plant preference behavior.