Provided in the present invention are anti-Mycoplasma spp. subunit vaccines, especially proteins suitable for being used as the active ingredient of the Mycoplasma spp. subunit vaccines, and a vaccine prepared therefrom. Upon experimenting, it is confirmed that the proteins can elicit an immune response having sufficient strength to avoid the infection of Mycoplasma spp. in pigs. The vaccine can comprise one of the aforementioned proteins as an active ingredient, or can comprise two or more of the proteins to form a form of cocktail vaccine. The vaccine of the present invention is not only more safe than conventional vaccines, but also has equivalent or even better immune effects.