Anaplasma marginale, the causative agent of bovine anaplasmosis, is a tick-borne bacterium that causes significant economic losses for cattle industries and is increasingly being detected in other animal species. Rhipicephalus microplus is the main vector of this bacterium and may be found parasitizing small ruminants. In northeastern Brazil, multispecies grazing is a common family subsistence practice on smallholder farms possibly facilitating interspecies transmission of pathogens. Considering that A. marginale infection has been previously molecularly described in sheep, this study has aimed to estimate the prevalence of A. marginale and factors associated with the infection in goats from northeastern Brazil. A total of 403 goat blood samples were included in the study. An epidemiological questionnaire was applied to each farm owner addressing age, gender, presence of ticks and multispecies grazing. All samples were screened for A. marginale- and A. ovis-infection using primers targeting the Anaplasma spp. msp4 gene. The identity of A. marginale in the blood was confirmed by PCR amplification of msp5 followed by sequencing. Anaplasma spp. were differentiated by sequencing of the repeat region of the msp1α gene. For the statistical analysis the Chi-square or the Fisher’s exact test was used to verify association of the individual factors (age, gender, presence of ticks, and multispecies grazing) with Anaplasma spp. infection. We report the first molecular detection of A. marginale in goats from northeastern Brazil, based on msp1α, msp4 and msp5 gene sequencing analysis. Sequencing of the detected A. marginale msp1α gene revealed the F repeat. Amblyomma parvum and R. microplus were found feeding on animals.