Unraveling the detailed mechanism of Chinese medicine in curing diseases is of vital importance for the development of such long-standing traditional medicine. Here, we investigated the exposed form in vivo and bioactivity of Chinese medicine from an aspect of supramolecular chemistry. We demonstrated that the genipin (GP), an aglycone of geniposide (GE) transformed by β-glucosidase, can react with methylamine (MA), a harmful metabolite in the gut, to produce gardenia blue in vivo, which leads to a significant decrease of MA. The gardenia blue is supramolecular assemblies (SA), which can alleviate the interference with intestinal bacteria. Moreover, the formation mechanism of SA was revealed, in which genimethylamine reacted from GP and MA, was covalently polymerized into dimers and then non-covalently self-assembled into the SA. This study provides evidence that the supramolecular pigments can be formed in vivo during the metabolism of Chinese medicine through simultaneously covalent and non-covalent assembly, which may play key roles in their pharmacological activity.