Given the shift to technology-mediated communication, this study investigated the factors that influence Chinese EFL learners’ willingness to communicate (WTC) in the second language (L2) in MOOCs. While most previous studies conceptualized L2WTC as a unified construct, this study made a first attempt to distinguish its oral and written dimensions, thereby addressing an underexplored gap and capturing the complexities of both modes in online learning environments. Data were collected through questionnaires from 323 Chinese undergraduate EFL learners and complemented by semi-structured interviews with 24 learners representing high, medium, and low levels of oral and written L2WTC. Unexpectedly, the results indicated that trait-like factors (perceived communicative competence and foreign language anxiety) negatively impacted both forms of L2WTC, whereas the influence of context-specific factors (teacher support and classroom environment) was more complex. Teacher support positively affected oral L2WTC but had a limited impact on written L2WTC. The positive aspects of the classroom environment, such as its flexibility and technological use, enhanced both oral and written L2WTC, though technical difficulties and a lack of peer connection also emerged as barriers to communication. These findings provided new insights for research in online learning environments and further suggested strategies to promote positive factors while mitigating negative ones to enhance oral and written L2WTC.