Mycoplasma ovipneumoniae (M. ovipneumoniae) causes a fatal infection in goats, leading to significant economic losses in the small-ruminant industry worldwide. The present study aimed to characterize the strains of M. ovipneumoniae infecting goats with pneumonia in Anhui Province, China. From November 2021 to January 2023, among 20 flocks, a total of 1320 samples (600 samples of unvaccinated blood, 400 nasal swabs, 200 samples of pleural fluid, and 120 samples of lung tissue) were obtained from goats with typical signs of pneumonia, such as a low growth rate, appetite suppression, increased temperature, discharge from the nose, and a cough. Necropsied goats showed increased pleural fluid, fibrinous pleuropneumonia, and attached localized pleural adhesions. M. ovipneumoniae isolated from the samples were subjected to an indirect hemagglutination test (IHA), PCR amplicon sequencing, phylogenetic analysis, and biochemical identification tests. The overall positivity rate of M. ovipneumoniae was 27.50%. Mycoplasmas were obtained from 80 (20.0%) nasal swabs, 21 (10.5%) pleural fluid samples, and 15 (12.5%) lung samples. PCR amplicon (288 bp) sequencing identified eight strains of M. ovipneumoniae. In a phylogenetic tree, the isolated strains were homologous to the standard strain M. ovipneumoniae Y-98 and most similar to M. ovipneumoniae FJ-SM. Local strains of M. ovipneumoniae were isolated from goats in Anhui province. The identified genomic features and population structure will promote further study of M. ovipneumoniae pathogenesis and could form the basis for vaccine and therapy development.