The classroom environment significantly affects the development of creativity. This study examined the impact of the classroom environment on students' creativity and the moderating role of thinking styles in this relationship. For this study, we recruited 451 students from six secondary schools. Data were collected using the Chinese Language Creativity Test, Classroom Environment Inventory, and Thinking Styles Inventory. Hierarchical regression analysis examined the moderating effect of thinking styles on the relationship between the classroom environment and creativity. The results showed that peer relationships in the classroom environment negatively influence students' fluency and originality in creativity. At the same time, teachers' evaluation and teaching methods positively affect the fluency of creativity. Thinking styles moderated the impact of the classroom environment on language creativity. This study identified four different moderating effects: the thinking styles matching the classroom environment can enhance language creativity, whereas the mismatched ones hinder it. However, matching would limit language creativity for individuals with creative thinking styles (e.g., legislative and anarchic thinking styles), while a mismatch can boost creative performance. The findings help educators understand students' creativity with different thinking styles in various classroom environments and provide individualized and effective strategies for optimizing educational environments and enhancing language creativity.