The importance of interspecific competition to habitat use by two congeneric stream gobies, Rhinogobius sp. LD (large‐dark type) and CB (cross‐band type), was studied by: (i) examining differences in habitat use by each species along the course of the stream; and (ii) comparing microhabitat use and the diet of each species between in allopatry and in sympatry in tributaries of the Shimanto River, south‐western Shikoku, Japan. Rhinogobius sp. LD mainly used riffles through the course of the stream. Although CB also mainly used riffles in the lower reaches where CB was numerically dominant, the greater use of riffles by CB was not observed in upper reaches where LD was dominant. Microhabitat analysis revealed that both LD and CB preferred lower bottom velocity in faster current in both allopatry and sympatry. In sympatry, however, LD used coarser substrate and faster current than CB, and both LD and CB used narrower ranges of microhabitat conditions than in allopatry. Dietary analysis indicated that both allopatric and sympatric LD preferred baetids, which are apt to drift, suggesting they adopted ambush foraging. Allopatric CB preferred leptophlebiids and chironomids, which are also apt to drift, whereas sympatric CB did not prefer such invertebrates. Overall results of this study suggest that LD and CB compete for better feeding habitats, CB shift their habitat use and foraging mode under the influence of LD, and current velocity and substrate coarseness are key factors in their habitat segregation.