Statins, as a group, are amongst the most prescribed drugs in recourse-rich countries: prescribed to lower circulating cholesterol and reduce the risk of cardiovascular disease. However their consumption is associated with a number of secondary side effects that have raised concerns about their safety. This has made statins a controversial therapeutic option, and some question whether long-term benefits outweigh the risks. One recurrent side-effect associated with statin intolerance is an increased risk of developing type-2-diabetes mellitus (T2DM). Up to now the aetiology of these unintended effects is not well understood and it has been hypothesised that the physiological state of the patient plays an important role in its development. However, despite the increasing awareness of the importance of a healthy gut microbiota in health and wellness and the knowledge of gut dysbiosis in the pathogenesis of T2DM, the possible impact of chronic statin therapy on this microbial community has not been investigated. Using a murine model we describe, for the first time, profound changes in the bacterial composition of the gut following statin treatment. This remodelling affected the diversity and metabolic profile of the gut microbiota, and was associated with reduced production of butyrate. Furthermore, statins altered the size and composition of the bile acid pool in the intestine, tentatively explaining the observed gut dysbiosis. Using gene knockout mice we demonstrated that the observed effects were mediated through the pregnane X receptor. Our study suggests that statin therapy affects the intestinal microbiota by deregulating bile acid metabolism and thus unhinging the gut–liver axis. Since the demonstrated importance of the gut microbiota in host well-being, our work expands on the knowledge of the potential physiological consequences of taking statins and provides a new perspective to prevent their inadvertent metabolic effects.