The microbial communities associated with alkaline–surfactant–polymer (ASP)-flooded reservoirs have rarely been investigated. In this study, high-throughput sequencing was used to analyse the indigenous microbial communities in two different blocks, the water flooding after the alkaline–surfactant–polymer flooding block and the alkaline–surfactant–polymer flooding block, and to ascertain the optimal stage for the implementation of indigenous microbial oil recovery technology. The different displacement blocks had significant effects on the indigenous microbial community at the genus level according to an alpha diversity analysis and community composition. In water flooding after alkaline–surfactant–polymer flooding, the dominant genus of Pseudomonas exceeded 30%, increasing to 52.1% in alkaline–surfactant–polymer flooding, but alpha diversity decreased. Through a co-occurrence network analysis, it was found that the complexity of the water flooding after alkaline–surfactant–polymer flooding was higher than that of alkaline–surfactant–polymer flooding. This means that the water flooding ecosystem after alkaline–surfactant–polymer flooding was more stable and less susceptible to external environmental influences. In addition, there were significant differences in the functional redundancy of microbial communities in different blocks. In summary, the optimal stage for implementing local microbial oil recovery technology may be water flooding after alkaline–surfactant–polymer flooding.