Objective: The purpose of this study was to evaluate the effectiveness and safety of computed tomography (CT)-guided radiofrequency thermocoagulation (RFTA) of the sphenopalatine ganglion (SPG) for patients with refractory headache. Methods: A total of 14 patients with refractory migraine and 10 patients with cluster headache (CH) who underwent CT-guided SPG RF between May 2019 and August 2021 at the Jiaxing First Hospital, located in Jiaxing City, Zhejiang Province, China, were included and analyzed in this retrospective cohort study. Pain score, sleep quality scores, and treatment effects were observed before operation as well as 1 day and 1, 3, 6, 12, and 24 months after surgery. Also, the incidence of facial numbness at different timepoints after operation was evaluated. Results: The frequency and duration of attacks decreased after treatment in patients with migraine, and the shortening of the cluster period and the prolongation of the remission period after treatment in patients with CH indicated that the treatment was effective. The numeric rating scale (NRS) ranged from 0 to 10, where 0 meant no pain and 10 meant the worst imaginable pain. The NRS of patients at 1 day and 1, 3, 6, 12, and 24 months after surgery was significantly lower than before operation (P \ 0.05). The treatment of patients with migraine and CH was effective. The overall incidence of numbness in patients with migraine and the total incidence of numbness in patients with CH was recorded. The total incidence of numbness decreased gradually, but no significant difference was detected in the incidence of numbness between the two groups (P [ 0.05). No serious adverse reactions, such as orthostatic hypertension, intracranial infection, and visual disturbance, occurred in the patients after operation.