Clay minerals and metal oxides, as important parts of the soil matrix, play crucial roles in the development of microbial communities. However, the mechanism underlying such a process, particularly on the formation of soil biofilm, remains poorly understood. Here, we investigated the effects of montmorillonite, kaolinite, and goethite on the biofilm formation of the representative soil bacteria Bacillus subtilis. The bacterial biofilm formation in goethite was found to be impaired in the initial 24 h but burst at 48 h in the liquid–air interface. Confocal laser scanning microscopy showed that the biofilm biomass in goethite was 3–16 times that of the control, montmorillonite, and kaolinite at 48 h. Live/Dead staining showed that cells had the highest death rate of 60% after 4 h of contact with goethite, followed by kaolinite and montmorillonite. Atomic force microscopy showed that the interaction between goethite and bacteria may injure bacterial cells by puncturing cell wall, leading to the swarming of bacteria toward the liquid–air interface. Additionally, the expressions of abrB and sinR, key players in regulating the biofilm formation, were upregulated at 24 h and downregulated at 48 h in goethite, indicating the initial adaptation of the cells to minerals. A model was proposed to describe the effects of goethite on the biofilm formation. Our findings may facilitate a better understanding of the roles of soil clays in biofilm development and the manipulation of bacterial compositions through controlling the biofilm in soils.