Abstract Background It has been proposed that divergence in the gut microbiota composition between incipient species could contribute to their reproductive isolation. Nevertheless, empirical evidence for the role of gut microbiota in speciation is scarce. Moreover, it is still largely unknown to what extent closely related species in the early stages of speciation differ in their gut microbiota composition, especially in non-mammalian taxa, and which factors drive the divergence. Here we analysed the gut microbiota in two closely related passerine species, the common nightingale (Luscinia megarhynchos) and the thrush nightingale (Luscinia luscinia). The ranges of these two species overlap in a secondary contact zone, where both species occasionally hybridize and where interspecific competition has resulted in habitat use differentiation. Results We analysed the gut microbiota from the proximal, middle and distal part of the small intestine in both sympatric and allopatric populations of the two nightingale species using sequencing of bacterial 16S rRNA. We found small but significant differences in the microbiota composition among the three gut sections. However, the gut microbiota composition in the two nightingale species did not differ significantly between either sympatric or allopatric populations. Most of the observed variation in the gut microbiota composition was explained by inter-individual differences. Conclusions To our knowledge, this is the first attempt to assess the potential role of the gut microbiota in bird speciation. Our results suggest that neither habitat use, nor geographical distance, nor species identity have strong influence on the nightingale gut microbiota composition. This suggests that changes in the gut microbiota composition are unlikely to contribute to reproductive isolation in these passerine birds.