This study was undertaken to determine the factors that influence the composition of macroinvertebrate communities in wells completed into two different bedrocks, limestone and flysch. The chemical parameters of the water in wells of both kinds did not significantly differ. The anthropogenic impact on the quality of water was revealed in some wells in both areas, which resulted in relatively low fauna diversity and abundance in polluted wells. Canonical correspondence analyses suggested that depth, age, sediment organic matter content, water oxygenation, and conductivity best explained the variance in the distribution of benthic fauna taxa. Among the 19 taxa that were determined to the family level, oligochaetous Clitellata dominated. They were represented by 13 species and one genus. Among them, two stygobionts, Trichodrilus moravicus and Rhyacodrilus subterraneus, were determined. Moreover, only one crustacean stygobiont, Niphargus tatrensis, was found, and it occurred only in a single well. A low number and abundance of stygobionts and stygophiles compared with stygoxenes was observed. Our studies showed that bedrock substratum does not influence macroinvertebrate composition.