We studied patterns of phylogenetic and compositional diversity of fleas parasitic on small mammals and asked whether these patterns are affected by environmental variation or evolutionary/historical processes. We considered environmental variation via both off‐host (air temperature, precipitation, the amount of green vegetation, latitude) and host‐associated (phylogenetic and species composition) environments. The indicators of evolutionary/historical processes were phylogenetic and compositional uniqueness estimated via phylogenetic or compositional, respectively, β‐diversity of either fleas or hosts. We found that phylogenetic uniqueness of flea assemblages was the main predictor of their phylogenetic diversity in all realms. In addition, host phylogenetic diversity and uniqueness played also some role in the Palearctic, whereas the effect of the off‐host environment was either extremely weak or absent. Compositional diversity of fleas was consistently affected by compositional diversity of hosts in all realms except the Neotropics. The effect of the off‐host environment on compositional flea diversity was substantial in all realms except the Palearctic. No effect of latitude on either metric of flea diversity was found. We conclude that phylogenetic diversity of fleas is driven mainly by evolutionary/historical processes, whereas drivers of their compositional diversity are associated with current ecological conditions.