Porcine transmissible gastroenteritis virus (TGEV) is an enteric coronavirus that has caused high morbidity and mortality of piglets worldwide. Previous studies have shown that the TGEV can lead to severe diarrhoea, vomiting and dehydration in 2-week-old piglets and weaned piglets, resulting in a large number of piglet deaths.Antimicrobial peptides have broad-spectrum antimicrobial activity and a strong killing effect on bacteria, especially on the drug-resistant pathogenic bacteria, and it has attracted broad concern. However, there are very few reports on the effect of APB-13 (an antimicrobial peptide) on the intestinal microbes of piglets infected with TGEV. In this study, 16S rRNA gene sequencing was used to compare the microbial phylum and the genus of piglet's enteric microorganism in different experimental groups, and to predict the metabolic function of the microbial flora. At the same time, the apparent digestibility of nutrients, digestive enzyme activity, daily weight gain and survival rate were also measured. TGEV infection could cause the imbalance of intestinal microbes in piglets, and increase of the relative abundance of Proteobacteria, and decrease of the relative abundance of Firmicutes, Bacteroidetes and Actinobacteri. With the addition of APB-13, this problem can be alleviated, which can reduce the relative abundance of Proteobacteria and improve the balance of intestinal microorganisms. At the microbial genus level, after adding APB-13, the relative abundance of Catenibacterium, Enterobacter and Streptococcus in the intestinal tract of piglets infected with TGEV showed significant decrease, while the relative abundance of Lactobacillus and Ruminococcus increased. Finally, we found that APB-13 can significantly increase the activity of digestive enzyme in the intestinal tract of piglet, thereby improving the apparent digestibility of nutrients and the growth performance of piglets. This study demonstrates that APB-13 can alleviate the adverse outcomes caused by TGEV infection by correcting the intestinal microbial disorders.