This study aimed to determine the mediation role of hope in the relationship of resilience with depression, anxiety, and stress in caregivers of children and adolescents with cancer. This cross-sectional study was conducted on 200 caregivers of children and adolescents with cancer. Adult Hope Scale, Connor-Davidson Resilience Scale, and Depression, Anxiety and Stress (DAS) scales were used for data collection. The mediator and moderator model was tested using the SPSS macro PROCESS (Model 4, and 5). The mediator model (model 4) indicated that DAS significantly correlated with resilience (β = − 0.54, t-value = − 5.01, p < 0.001), and hope (β = − 0.84, t-value = − 3.45, p = 0.0007). Hope mediated the relationship between resilience and DAS among caregivers of children and adolescents with cancer (Effect = − 0.18, SE = 0.06, 95% CI − 0.33 to − 0.06). The mediator and moderator model (model 5) showed that female caregivers had a stronger correlation between resilience and DAS when compared to their male counterparts (β = − 0.56, t-value = − 3.90, p-value = 0.0001); also, hope mediated the relationship between resilience and DAS among caregivers of children and adolescents with cancer (Effect = − 0.20, SE = 0.08, 95% CI − 0.37 to − 0.04). In conclusion, hope was a mediator, and female caregivers were a moderator in the relationship of resilience with depression, anxiety, and stress, and its promotion might be effective among caregivers of children and adolescents with cancer. It seems that resilience, female caregivers, and hope may provide good protection against depression, anxiety, and stress in caregivers of cancer patients.