The bacterium Mycoplasma hyopneumoniae (Mhp) causes a chronic infectious respiratory disease in pigs, leading to important economic losses. This study aimed to compare the immune response of the local Piau breed and a commercial line to Mhp vaccination. For this, two phases were carried out. In the first, gene expression of toll-like receptors (TLR2, TLR4, TLR6, and TLR10) and cytokines (IL2, IL6, IL8, IL10, IL12, IL13, TNFα, and TGFβ) was assessed in porcine blood mononuclear cells (PBMC) from the two genetic groups before and after vaccination. In the second experiment, nitric oxide production, specific antibodies, and gene expression of toll-like receptors and cytokines were evaluated in bronchoalveolar lavage fluid (BALF) cells of vaccinated and unvaccinated pigs. After vaccination against Mhp, TLR2, TLR4, TLR6, TLR10, IL6, TNFα, and TGFβ expression levels were elevated in PBMC from commercial animals, and TLR6, TLR10, and TGFβ expression levels were elevated in PBMC from the Piau group. Vaccination also increased the production of Mhp-specific IgG antibodies in BALF cells in the Piau breed. Comparison of the two genetic groups revealed differences in TNFα and IL10 expression in BALF cells. These results show that Piau pigs have different immune responses to vaccination compared with commercial animals. It is worth noting that these genetic differences between both genetic groups may be related to phenotypic differences in Mhp resistance or susceptibility.