Recently, the research on pig intestinal microbiota has become a hot topic in the field of animal husbandry. There are few articles describing the dynamic changes of porcine fecal microbiota and metabolites at different time points from birth to market. In the present study, 381 fecal samples were collected from 633 commercial pigs at 7 time points, including the 1st day, the 10th day, the 25th day, the 45th day, the 70th day, the 120th day, and the 180th day after the birth of swine, were used for microbiome analysis by Illumina MiSeq sequencing methods while 131 fecal samples from 3 time points, the 10th day, the 25th day, and 70th day after birth, were used for metabolome analysis by LC-MS methods. For the microbiome analysis, the fecal microbial richness increased over time from day 1 to 180 and the β-diversity of fecal microbiota was separated significantly at different time points. Firmicutes were the main phyla from day 10 to 180, followed by Bacteroides. The abundance of Lactobacillus increased significantly on day 120 compared with the previous 4 time points. From day 120 to day 180, the main porcine fecal microbes were Lactobacillus, Clostridium_sensu_stricto_1, Terrisporobacter and Streptococcus. Clostridium_sensu_stricto_1 and Terrisporobacter increased over time, while Lactobacillus, Escherichia-Shigella, Lachnoclostridium decreased with the time according to the heatmap, which showed the increase or decrease in microbial abundance over time. For the metabolome analysis, the PLS-DA plot could clearly distinguish porcine fecal metabolites on day 10, 25, and 70. The most different metabolic pathways of the 3 time points were Tryptophan metabolism, Sphingolipid signaling pathway, Protein digestion and absorption. Some metabolites increased significantly over time, such as Sucrose, L-Arginine, Indole, 2,3-Pyridinedicarboxylic acid and so on, while D-Maltose, L-2-Aminoadipic acid, 2,6-diaminohexanoic acid, L-Proline were opposite. The correlation between fecal metabolites and microbiota revealed that the microbes with an increasing trend were positively correlated with the metabolites affecting the tryptophan metabolic pathway from the overall trend, while the microbes with a decreasing trend were opposite. In addition, the microbes with an increasing trend were negatively correlated with the metabolites affecting the lysine pathway. In conclusion, this study elucidated the dynamic changes of porcine fecal microbiota and metabolites at different stages from birth to market, which may provide a reference for a comprehensive understanding of the intestinal health status of pigs at different growth stages.