The gut microbiome contributes to the variation of blood lipid levels, and secondary bile acids are associated with the effect of statins. Yet, our knowledge of how statins, one of our most common drug groups, affect the human microbiome is scarce. We aimed to characterize the effect of rosuvastatin on gut microbiome composition and inferred genetic content in stool samples from a randomized controlled trial (n = 66). No taxa were significantly altered by rosuvastatin during the study. However, rosuvastatin-treated participants showed a reduction in the collective genetic potential to transport and metabolize precursors of the pro-atherogenic metabolite trimethylamine-N-oxide (TMAO, p < 0.01), and an increase of related metabolites betaine and γ-butyrobetaine in plasma (p < 0.01). Exploratory analyses in the rosuvastatin group showed that participants with the least favorable treatment response (defined as < median change in high-density/low-density lipoprotein (HDL/LDL) ratio) showed a marked increase in TMAO-levels compared to those with a more favorable response (p < 0.05). Our data suggest that while rosuvastatin has a limited effect on gut microbiome composition, it could exert broader collective effects on the microbiome relevant to their function, providing a rationale for further studies of the influence of statins on the gut microbiome.