Tylosin, an antibiotic with a long history in treating respiratory bacterial infections, has unknown effects on the gut microbiota of healthy and infected pigs. The study aimed to investigate the effect of a therapeutic dose of tylosin on swine gut microbiota and explored the relationship between this effect and tylosin pharmacokinetics (PK). We also assessed whether changes in gut microbiota after tylosin administration differ between healthy animals (n = 7) and animals intranasally co-infected (n = 7) with
Actinobacillus pleuropneumoniae
and
Pasteurella multocida
. Both groups were intramuscularly administered with tylosin (20 mg/kg). The 16S rRNA gene analyses revealed a significantly lower species richness and diversity, after tylosin treatment, in the infected than the healthy pigs, with infected pigs having lower levels of
Bacteroidetes
and
Firmicutes
and higher levels of
Proteobacteria
. Greater tylosin exposure (greater area under curve (AUC) and maximum plasma concentration (C
max
), and slower elimination (longer terminal half-life, T
1/2
) were observed in healthy than infected pigs. Relative abundance of
Lactobacillus
,
Oscillibacter
,
Prevotella
, and
Sporobacter
was positively and significantly correlated with AUC and C
max
, whereas the abundance of
Acinetobacter
,
Alishewanella
, and
Pseudomonas was
positively and significantly correlated with T
1/2
and mean residence time (MRT) of tylosin. Our findings, for the first time, demonstrated significant changes in swine gut microbiota after a single therapeutic dose of tylosin was administered, whereas the effect of these changes on tylosin PK was not evident.