Background: Understanding the information needs of caregivers in cancer care and managing their anxiety are crucial aspects of comprehensive nursing care. Nurses need to identify effective strategies to achieve this objective, yet there are limited studies in this area. Objectives: This study was designed to compare the effects of providing structured education versus needs-based education on the anxiety levels of cancer family members. Methods: In this randomized controlled trial, 80 primary caregivers of cancer patients were equally assigned to two study groups (group A: Education based on family members' needs, group B: Structured education) using a randomized minimization method. The Spielberger State-Trait Anxiety Inventory (STAI) was used for data collection. Data analysis employed descriptive statistics, Shapiro-Wilk test, chi-square test, Fisher’s exact test, Wilcoxon test, and Mann-Whitney U test at a significance level of 0.05. Results: The results indicated that the study groups were similar in terms of demographic characteristics. In group A, the mean ± SD of the STAI score was 54.2 ± 6.09 at baseline and decreased to 45.13 ± 3.87 after intervention (P = 0.001). In group B, the mean ± SD of the STAI score was 54.00 ± 4.92 at baseline and decreased to 51.68 ± 5.91 (P = 0.006). There were no statistically significant differences between the two groups at baseline (P = 0.872). However, a statistically significant difference in the STAI score was observed after intervention, and there was a significant difference in mean changes of the STAI score between groups (P = 0.001). Conclusions: Tailoring educational content according to the needs of cancer family members resulted in greater reductions in anxiety scores compared to the structured education method.