Bacterial transport and retention likely depend on bacterial and soil surface properties, especially hydrophobicity. We used a controlled experimental setup to explore hydrophilic Escherichia coli (E. coli) and hydrophobic Rhodococcus erythropolis (PTCC1767) (R. erythropolis) transport through dry (− 15,000 cm water potential) and water saturated (0 cm water potential) wettable and water-repellent sand columns. A pulse of bacteria (1 × 108 CFU mL–1) and bromide (10 mmol L–1) moved through the columns under saturated flow (0 cm) for four pore volumes. A second bacteria and bromide pulse was then poured on the column surfaces and leaching was extended six more pore volumes. In dry wettable sand attachment dominated E. coli retention, whereas R. erythropolis was dominated by straining. Once wetted, the dominant retention mechanisms flipped between these bacteria. Attachment by either bacteria decreased markedly in water-repellent sand, so straining was the main retention mechanism. We explain this from capillary potential energy, which enhanced straining under the formation of water films at very early times (i.e., imbibing) and film thinning at much later times (i.e., draining). The interaction between the hydrophobicity of bacteria and soil on transport, retention and release mechanisms needs greater consideration in predictions.