While mixed-species flocks of birds (hereafter ‘flocks’) have been widely studied, few studies have looked at the effect of habitat structure on flock presence and flocking propensity within a site. Here, we employ a use-availability approach in locations with flocks and random locations to ask whether habitat characteristics influence the presence of flocks, and whether structurally similar microhabitats support compositionally similar flocks. We also examine the effect of habitat on flock size and species richness, and the effect of intraspecifically gregarious flock participants on habitat selection. We find that flocks use a narrow subset of available tree density and canopy cover variation and prefer relatively less-dense areas with large trees and a complex foliage structure. Similar microhabitats do not result in compositionally similar flocks, and while foliage complexity was associated with flock size, no habitat characteristics influenced species richness. Flocks led by the intraspecifically gregarious western crowned warbler (Phylloscopus occipitalis), a potential nuclear species, showed preference for high foliage complexity and tree density. Thus, habitat preferences of intraspecifically gregarious species, which are followed by other species, could play a strong role in habitat selection in flocks. This suggests that degraded forests that cannot provide a suitable range of tree density, canopy cover, and/or complex vegetation structure may not support some core flock species around which flocks form, which may lead to decreased flocking in those patches.