BackgroundNursing undergraduates’ academic self-efficacy is a significant factor in determining their learning motivation, cognition, and emotions. It has a significant impact on improving academic performance and achieving learning goals.MethodsTo explore the mechanism of psychological distress affecting the academic self-efficacy of nursing undergraduates, the generalized anxiety disorder scale-7, patient health questionnaire-9, academic self-efficacy scale, perceived social support scale and mindful attention awareness scale were conducted.ResultsModel fitness indexes of the structural equation model is good (CMIN/DF = 1.404, RMSEA = 0.042, GFI = 0.977, IFI = 0.977, TLI = 0.954, CFI = 0.975, NFI = 0.923). Structural equation model analysis showed that social support and mindfulness were the mediating variables of psychological distress on academic self-efficacy. Mediating variables accounted for 44% of the total effect value (− 0.3) with a value of − 0.132. Three paths were verified: psychological distress indirectly affected academic self-efficacy through social support (− 0.064); psychological distress indirectly affected academic self-efficacy through mindfulness (− 0.053); psychological distress indirectly affected academic self-efficacy through social support and mindfulness (− 0.015).ConclusionsSocial support and mindfulness play significant mediating roles in the effect of psychological distress on academic self-efficacy, and the chain mediating role of social support and mindfulness is also significant. Educators may mitigate the impact of psychological distress on academic self-efficacy by enhancing students’ social support and mindfulness.