As a common non-respiratory symptom of COVID-19, headache should not be overlooked, and its characteristics should be recorded with scrutiny. Identifying risk factors associated with post-COVID headache will ensure immediate action and counseling for this population of patients. Therefore, the study aimed to investigate the relationship between headache and psychological state (stress level, depression, and anxiety symptoms) in adults undergoing post-COVID-19 rehabilitation. In addition, we used mediation analysis to evaluate the mediation effect of psychological variables in the relationship between headache and quality of life. This cross-sectional study included 147 patients undergoing post-COVID-19 rehabilitation at the Public Hospital in Poland (64 males, 83 females, with mean age of 56.97 years). Psychological parameters were evaluated using the Hospital Anxiety and Depression Scale (HADS), the Perceived Stress Scale (PSS-10), and the brief World Health Organization Quality of Life Scale (WHOQOL-BRIEF). Additionally, all participants completed a questionnaire related to COVID-19 symptoms and their severity, the place of COVID-19 treatment, and the need for oxygen therapy during hospitalization. Of all participants, 65% experienced headache during COVID-19. Of the participants with headache, there were significantly more females in this group (69% vs. 31%), and they were significantly younger (mean age 55.47 vs. 59.78 years). Participants with headache had a 27% higher HADS-D score, a 21% higher HADS-A score, and a 13% higher PSS-10 score. Moreover, gender and headache were found to be important predictor variables for total HADS and HADS-D, accounting for 11% and 7%, respectively. Mediation analysis has shown that the tested psychological variables mediated 39-68% of the total effect of headache influence on WHOQOL domains. In conclusion, our study demonstrated several relationships between headache that occurred during COVID-19 and symptoms of depression, anxiety, and perceived stress level during post-COVID rehabilitation also in the context of quality of life. Our results show that patients who experienced headaches during COVID-19 are at high risk of developing anxiety-depressive symptoms later. Female gender is associated with a higher prevalence of headache during COVID-19.