Porcine deltacoronavirus (PDCoV) is an enteropathogenic coronavirus that mainly causes diarrhea in suckling piglets, and also has the potential for cross-species transmission. However, there are still no commercial vaccines available to prevent and control PDCoV infection. In this study, PDCoV strain HNZK-02 was serially propagated in vitro for up to 150 passages and the amino acid changes have mainly occurred in the S protein during serial passage which caused structure change. PDCoV HNZK-02-passage 5 (P5)-infected piglets exhibited acute and severe watery diarrhea, an obvious intestinal damage, while the piglets infected with PDCoV HNZK-02-P150 showed no obvious clinical signs, weak intestinal lesions, and lower viral loads in rectal swabs and various tissues. Compared with the PDCoV HNZK-02-P5 infection, HNZK-02-P150 infection resulted in a decrease in intestinal mucosal permeability and pro-inflammatory cytokines. Moreover, PDCoV HNZK-02-P5 infection had significantly reduced bacterial diversity and increased relative abundance of opportunistic pathogens, while PDCoV HNZK-02-P150 infection did not significantly affect the bacterial diversity, and the relative abundance of probiotics increased. Furthermore, the alterations of gut microbiota were closely related to the change of pro-inflammatory factor. Metagenomics prediction analysis demonstrated that HNZK-02-P150 modulated the tyrosine metabolism, Nucleotide-binding and oligomerization domain (NOD)-like receptor signaling pathway, and lipopolysaccharide biosynthesis, which coincided with lower inflammatory response and intestinal permeability in the piglets infected with HNZK-02-P150. In conclusion, the PDCoV HNZK-02 was successfully attenuated by serial passage in vitro, and the changes of S gene, metabolic function, and gut microbiota may contribute to the attenuation. The PDCoV HNZK-02-P150 may have the potential for developing live-attenuated vaccine.IMPORTANCEPorcine deltacoronavirus (PDCoV) is an enteropathogen causing severe diarrhea, dehydration, and death in nursing piglets, devastating great economic losses for the global swine industry, and has cross-species transmission and zoonotic potential. There are currently no approved treatments or vaccines available for PDCoV. In addition, gut microbiota has an important relationship with the development of many diseases. Here, the PDCoV virulent HNZK-02 strain was successfully attenuated by serial passage on cell cultures, and the pathogenesis and effects on the gut microbiota composition and metabolic function of the PDCoV HNZK-02-P5 and P150 strains were investigated in piglets. We also found the genetic changes in the S protein during passage in vitro and the gut microbiota may contribute to the pathogenesis of PDCoV, while their interaction molecular mechanism would need to be explored further.