Anaplasma and Ehrlichia are important emerging tick-borne pathogens in both humans and animals. Here, we conducted a molecular surveillance study in Gansu, China to assess the prevalence of Anaplasma and Ehrlichia spp. in red deer and sika deer based on polymerase chain reaction (PCR) analysis and sequencing of 16S rRNA or msp genes. PCR revealed that the prevalence of Anaplasma ovis, Anaplasma bovis and Anaplasma platys of the Qilian Mountain samples was 32%, 9% and 9%, respectively; the prevalence of Anaplasma ovis, Anaplasma bovis, Anaplasma platys was 20%, 15% and 15% among the Long Mountain samples, respectively. Of the Long Mountain samples, two (5%) of the 40 samples were positive for Ehrlichia canis, but all 44 of the Qilian Mountain samples were negative for E. canis, and no other Anaplasma or Ehrlichia spp. were found in the samples. The phylogenetic tree showed that the newly isolated Anaplasma and Ehrlichia spp. could be classified as belonging to four clades, including an A. bovis cluster, A. ovis cluster, A. platys cluster and E. canis cluster. In addition, Bartonella schoenbuchensis was firstly identified in blood samples from red deer in Gansu, China. Our results provide important data to increase the understanding of the epidemiology of anaplasmosis and ehrlichiosis of red deer and sika deer and will assist with the implementation of measures to control anaplasmosis and ehrlichiosis transmission to red deer, sika deer and other animals in Gansu, China.