Porcine epidemic diarrhea (PED) is a disease that has a devastating effect on livestock. Currently, most studies are focused on comparing gut microbiota of healthy piglets and piglets with PED, resulting in gut microbial populations related to dynamic change in diarrheal piglets being poorly understood. The current study analyzed the characteristics of gut microbiota in porcine epidemic diarrhea virus (PEDV)-infected piglets during the suckling transition stage. Fresh fecal samples were collected from 1 to 3-week-old healthy piglets (
n
= 20) and PEDV infected piglets (
n
= 18) from the same swine farm. Total DNA was extracted from each sample and the V3–V4 hypervariable region of the 16S rRNA gene was amplified and sequenced using the Illumina MiSeq platform. Statistically significant differences were observed in bacterial diversity and richness between the healthy and diarrheal piglets. Principal coordinates analysis (PCoA) showed structural segregation between diseased and healthy groups, as well as among 3 different age groups. The abundance of
Escherichia-Shigella
,
Enterococcus
,
Fusobacterium
, and
Veillonella
increased due to dysbiosis induced by PEDV infection. Notably, there was a remarkable age-related increase in
Fusobacterium
and
Veillonella
in diarrheal piglets. Certain SCFA-producing bacteria, such as
Ruminococcaceae_UCG-002
,
Butyricimonas
, and
Alistipes
, were shared by all healthy piglets, but were not identified in various age groups of diarrheal piglets. In addition, significant differences were observed between clusters of orthologous groups (COG) functional categories of healthy and PEDV-infected piglets. Our findings demonstrated that PEDV infection caused severe perturbations in porcine gut microbiota. Therefore, regulating gut microbiota in an age-related manner may be a promising method for the prevention or treatment of PEDV.