Abstract Spatial distribution of soil microorganisms is relevant for the functioning and performance of many ecosystem processes such as nutrient cycling or biodegradation of organic matters and contaminants. Beside the multitude of abiotic environmental factors controlling the distribution of microorganisms in soil systems, many microbial species exhibit chemotactic behavior by directing their movement along concentration gradients of nutrients or of chemoattractants produced by cells of their own kind. This chemotactic ability has been shown to promote the formation of complex distribution patterns even in the absence of environmental heterogeneities. Microbial population patterns in heterogeneous soil systems might be, hence, the result of the interplay between the heterogeneous environmental conditions and the microorganisms' intrinsic pattern formation capabilities. In this modeling study, we combined an individual-based modeling approach with a reactive pore-network model to investigate the formation of bacterial patterns in homogeneous and heterogeneous porous media. We investigated the influence of different bacterial chemotactic sensitivities (toward both substrate and bacteria) on bacterial distribution patterns. The emerging population patterns were classified with the support of a geostatistical approach, and the required conditions for the formation of any specific pattern were analyzed. Results showed that the chemotactic behavior of the bacteria leads to non-trivial population patterns even in the absence of environmental heterogeneities. The presence of structural pore scale heterogeneities had also an impact on bacterial distributions. For a range of chemotactic sensitivities, microorganisms tend to migrate preferably from larger pores toward smaller pores and the resulting distribution patterns thus resembled the heterogeneity of the pore space. The results clearly indicated that in a porous medium like soil the distribution of bacteria may not only be related to the external constraints but also to the chemotactic behavior of the bacterial cells.