Background and Aims Anxiety is one of the common mental illnesses affecting sexual functions among infertile women. Information and education interventions might be effective in facilitating their coping with anxiety disorder which lead to improved sexual functions and psychological wellbeing. This is the first trial to pilot-test the effectiveness of sexual health education, delivered through virtual sessions and educational booklets, in improving both psychological (reduced anxiety scores) and physical (increased sexual function) outcomes among women with infertility in Iran. Methods In this triple-blind pilot randomized controlled trial, 90 women seeking medical treatment for infertility were randomly divided into three groups: (a) control, (b) educational booklet, and (c) virtual education. Participants in the virtual education group received six sessions of sexual health education through educational video using the WhatsApp social network. The primary outcomes included anxiety and sexual function scores measured before and 6 weeks after the intervention. Results The results showed that, after the intervention, mean state anxiety scores were significantly lower in the booklet (29.27 +/- 4.5, p < 0.001) and virtual education groups (13.77 +/- 11.6, p < 0.001) compared with the control group (49.26 +/- 6.86). Similarly, mean trait anxiety scores significantly decreased in the booklet (27.03 +/- 6.29, p < 0.001) and virtual education groups (31.66 +/- 11.63, p < 0.001) compared with the control group (45.93 +/- 6.52). Post-intervention, there were significant differences between the intervention and control groups in mean scores across four dimensions of sexual function: sexual desire, sexual stimulation, orgasm, and sexual satisfaction. The virtual education and booklet groups did not show a statistically significant difference in the mean scores of state and trait anxiety, and sexual function. Conclusion Psychoeducation interventions via virtual education sessions or educational booklets appear to reduce the level of anxiety and positively affect sexual functions associated with infertility. Women seeking treatment for infertility may benefit from psychoeducational interventions, though further studies with larger sample sizes are needed to confirm these findings.