Anaplasma marginale is an obligate intracellular Gram-negative bacterium found in ruminants’ erythrocytes and is the etiological agent of bovine anaplasmosis. The bacterium’s genetic diversity has been characterized based on sequences of major surface proteins (MSPs), such as MSP1α. The aim of the present study was to investigate the genetic diversity of A. marginale in cattle in the state of Maranhão, northeastern Brazil. To this end, 343 blood samples were harvested and subjected to iELISA assays using the recombinant surface protein MSP5. Out of 343 blood samples, 235 (68.5%) were randomly chosen and submitted to DNA extraction, qPCR and conventional PCR targeting the msp1α gene to determine amino acid sequences and classify the genotypes. The iELISA results showed 81.34% seropositivity (279/343), whereas qPCR revealed 224 positive samples (95.32%). Among these qPCR-positive samples, 67.4% (151/224) were also positive in the cPCR. Among the 50 obtained sequences, 21 strains had not been previously reported. Regarding the genotypes, H (26/50) and E (18/50) were identified most often, while genotypes F and C were only identified twice each and B and G once each. In conclusion, high prevalence and genetic diversity for A. marginale were observed in dairy cattle herds in the state of Maranhão.