Mycoplasma hyopneumoniae (M. hyopneumoniae) causes enzootic pneumonia in pigs but it is still largely unknown which host-pathogen interactions enable persistent infection and cause disease. In this study, we analyzed the host and bacterial transcriptomes during infection using RNA sequencing. Comparison of the transcriptome of lung lesion tissue from infected pigs with lung tissue from noninfected animals, identified 424 differentially expressed genes (FDR < 0.01 and fold change > 1.5LOG2). These genes were part of the following major pathways of the immune system: interleukin signaling (type 4, 10, 13, and 18), regulation of Toll-like receptors by endogenous ligand and activation of C3 and C5 in the complement system. Besides analyzing the lung transcriptome, a sampling protocol was developed to obtain enough bacterial mRNA from infected lung tissue for RNA sequencing. This was done by flushing infected lobes in the lung, and subsequently enriching for bacterial RNA. On average, 2.2 million bacterial reads were obtained per biological replicate to analyze the bacterial in vivo transcriptome. We compared the in vivo bacterial transcriptome with the transcriptome of bacteria grown in vitro and identified 22 upregulated and 30 down-regulated genes (FDR < 0.01 and fold change > 2LOG2). Six out of seven genes in the operon encoding the mycoplasma specific F1-like ATPase (MHP_RS02445-MHP_RS02475) and all genes in the operon MHP_RS01965-MHP_RS01990 with functions related to nucleotide metabolism, spermidine transport and glycerol-3-phoshate transport were up-regulated in vivo. Down-regulated in vivo were genes related to glycerol uptake, cilium adhesion (P102), cell division and myoinositol metabolism. In addition to providing a novel method to isolate bacterial mRNA from infected lung, this study provided insights into changes in gene expression during infection, which could help development of novel treatment strategies against enzootic pneumonia caused by M. hyopneumoniae.