Age can significantly affect human physiology and disease risk. Recent studies have shown that age may affect the composition and function of the gut microbiota, but the underlying mechanisms remain largely unknown. Non-human primates are an ideal model for uncovering how age shapes the gut microbiota, as their microbial composition is highly similar to that of humans and is not easily affected by confounding factors. Here, using the 16S rRNA and metagenomic sequencing methods, we characterized the microbial phenotypes of 16 female cynomolgus macaques from three age groups (young, adult and old). Our findings revealed significant differences in microbial composition among the three groups. With increased age, the relative abundances of Veillonellaceae, Coriobacteriaceae and Succinivibrionaceae were significantly increased, Ruminococcaceae and Rikenellaceae were significantly decreased at the family level. Functional enrichment showed that genes that differed among the three groups were mainly involved in arginine biosynthesis, purine metabolism and microbial polysaccharides metabolism. Moreover, CAZymes corresponding to polysaccharide degrading activities were also observed among the three groups. In conclusion, we characterized the composition and function of the gut microbiota at different ages, and our findings provide a new entry point for understanding the effects of age on the human body.