Foliar herbivory is known to directly affect phyllosphere microbiomes through altering plant phenotypes. However, how plant evolutionary responses to herbivory shape phyllosphere microbiomes is unclear. Here we use different invasive populations of the plant Ambrosia artemisiifolia that vary in reassociation timespan with a native specialist herbivore, to test whether renewed selection imposed by the herbivore is accompanied by evolutionary shifts in leaf chemistry and correlated changes in phyllosphere microbial communities. In common garden experiments we found directional changes in phyllosphere fungal communities with increasing duration of reassociation, accompanied by increased phyllosphere fungal alpha diversity and community complexity. These changes were associated with shifts in concentrations of plant metabolites, expression levels of their underlying biosynthetic genes, and increased plant herbivore resistance. Invasive plant reassociation with specialist insects can thus reshape phyllosphere fungal communities via changes in plant chemistry, demonstrating the role of plant evolutionary responses to herbivores in modulating microbial communities.