This study aimed to compare female and male students’ attitudes and achievements within different learning settings determined by e-learning and in-classroom learning modalities, collaborative (CL), and traditional (TL) learning pedagogies and investigated the effect of single-gender (SG) and mixed-gender (MG) grouping in an undergraduate biology course. 1375 biology students enrolled in a public university were randomly divided into 12 learning settings. Keller’s ARCS model and Vygotsky’s Socio-cultural Theory were the theoretical frameworks that guided this study. Results indicated that females attained higher achievement and more positive attitude towards biology in TL and CL sections in single-gender compared to mix-gender classes; overall, academic achievements between females and males demonstrated a significant difference at P < .05. Females students performed relatively low achievement and had a negative attitude toward biology in mix-gender CL groups (2 Females + 2 Males) compared to single-gender CL groups (4 Females) in in-classroom modality. E-learning attenuated the negative impact of mixed-gender grouping on female students within e-learning CL settings. The effect size value indicated that males benefited more than females from mixed-gender CL (2F + 2 M) pedagogy in e-learning and in-classroom modalities. Thus, e-learning may encourage female students to overcome the socio-cultural barrier that leads them to feel reticence in mixed-gender groups. The study helps to understand the most suitable learning settings for female and male students to decrease gender disparities, reduce the negative influences of stereotypical threats in different socio-cultural environments, and develop learning strategies to further equalize opportunities for females and male students, promoting students’ attitudes and achievement in undergraduate biology education.