Although the impact of group dynamics on creativity is widely recognized, prior research has primarily concentrated on individuals in isolation from social context. To address this lacuna, we focus on groups as the fundamental unit of analysis. We used functional near-infrared spectroscopy (fNIRS) to examine brain activity in groups of four during brainstorming discussions. We assessed interbrain coupling in the dorsolateral prefrontal cortex (DLPFC), a brain region linked to flexibility, and in the inferior frontal gyrus (IFG), a region associated with imitation. Our findings demonstrate that creativity-focused discussions induced interbrain coupling both in regions related to flexibility and herding. Notably, interbrain coupling in the IFG was associated with more imitation of responses. Critically, while interbrain coupling in the DLPFC positively predicted group creativity, in the IFG it negatively predicted creativity. These findings suggest that increase in group mindsets of flexibility relative to herding is important for enhancing group creativity.