The aim of this study was to determine the effects of long-term Nicotinamide mononucleotide (NMN) treatment on modulating gut microbiota diversity and composition, as well as its association with intestinal barrier function. In this study, C57BL/6J mice were fed different concentrations of NMN, and their feces were collected for detection of 16S rDNA and non-targeted metabolites to explore the effects of NMN on intestinal microbiota and metabolites. The results revealed that NMN increased the abundance of butyric acid-producing bacteria (Ruminococcae_UCG-014 and Prevotellaceae_NK3B31_group) and other probiotics (Akkermansia muciniphila), while the abundance of several harmful bacteria (Bilophila and Oscillibacter) were decreased after NMN treatment. Meanwhile, the level of bile acid-related metabolites in feces from the G1 group (0.1 mg/ml) was significantly increased compared to the control group, including cholic acid, taurodeoxycholic acid, taurocholic acid, glycocholic acid, and tauro-β-muricholic acid. In addition, long-term NMN treatment affected the permeability of the intestinal mucosa. The number of goblet cells and mucus thickness increased, as well as expression of tight junction protein. These results demonstrate that NMN reduced intestinal mucosal permeability and exerts a protective effect on the intestinal tract. This study lays the foundation for exploring NMN's utility in clinical research.