Objective: This study examines the mediating role of cognitive flexibility in the relationship between home-school co-education (H-SCE) and depressive symptom among vocational college students in urban and rural areas of China. Methods: Utilizing the Theory of Overlapping Spheres of Influence, this research explores how H-SCE influences depressive symptom, considering cognitive flexibility as a key mediating factor. The study utilized established scales, including the Inventory of Parent and Peer Attachment (IPPA) for parent-child relationships, the Student-Teacher Relationship Scale (STRS), the Cognitive Flexibility Inventory (CFI), and the Center for Epidemiologic Studies Depression Scale (CES-D10). Results: A total of 1090 valid questionnaires were analyzed, revealing a significant negative correlation between H-SCE and depressive symptom. Cognitive flexibility was found to partially mediate this relationship, suggesting that enhanced cognitive adaptability, fostered through effective H-SCE, can reduce depressive symptom by helping students better cope with stressors. Conclusion: These findings underscore the importance of fostering strong collaboration between families and schools to enhance cognitive resilience and mitigate psychological challenges faced by vocational students, providing a foundation for targeted interventions to promote mental well-being.