The evolution of phytochemical diversity and biosynthetic pathways in plants can be evaluated from a phylogenetic and environmental perspective. Pilocarpus Vahl (Rutaceae), an economically important medicinal plant in the family Rutaceae, has a great diversity of imidazole alkaloids and coumarins. In this study, we used phylogenetic comparative methods to determine whether there is a phylogenetic signal for chemical traits across the genus Pilocarpus; this included ancestral reconstructions of continuous and discrete chemical traits. Bioclimatic variables found to be associated with the distribution of this genus were used to perform OLS regressions between chemical traits and bioclimatic variables. Next, these regression models were evaluated to test whether bioclimatic traits could significantly predict compound concentrations. Our study found that in terms of compound concentration, variation is most significantly associated with adaptive environmental convergence rather than phylogenetic relationships. The best predictive model of chemical traits was the OLS regression that modeled the relationship between coumarin and precipitation in the coldest quarter. However, we also found one chemical trait was dependent on phylogenetic history and bioclimatic factors. These findings emphasize that consideration of both environmental and phylogenetic factors is essential to tease out the intricate processes in the evolution of chemical diversity in plants. These methods can benefit fields such as conservation management, ecology, and evolutionary biology.