This work aimed to analyze the effect of the boundary segmentation algorithm in thyroid nodules image segmentation and the influence of its adoption in avoiding recurrent laryngeal nerve (RLN) injury during treatment of thyroid nodules. The nodule boundary was extracted aided by the local Gaussian distribution fitting energy (LGDF) segmentation algorithm, which was compared with the normalized cut (Ncut) algorithm and the Canny algorithm. Then, 51 patients treated with microwave ablation for thyroid nodules were taken as a test group, and 51 patients treated with surgical resection were taken as a control group. The incidence of RLN injury and the levels of free triiodothyronine (FT3), free thyroid hormone (FT4), and thyroid-stimulating hormone (TSH) were compared between the two groups before and after treatment. The results showed that the true positive fraction (TPF) of the LGDF segmentation algorithm was 69.45%, the TPF of the Ncut algorithm and the Canny algorithm were 58.65% and 52.37%, respectively. The TPF of LGDF algorithm was higher than that of the Ncut algorithm and Canny algorithm, with notable differences ( P < 0.05 ). In the control group, there were 10 cases of temporary and permanent damage to the RLN after operation, and the total incidence was 19.61%. In the test group, there were 3 cases of temporary and permanent damage to the RLN after operation, and the total incidence was 5.88%, which was lower than that of the control group ( P < 0.05 ). No evident differences were shown in the levels of FT3, FT4, and TSH between the two groups before treatment ( P > 0.05 ). However, after treatment, the TSH level of the test group (4.58 ± 0.79) was higher than that of the control group (3.19 ± 0.17), and the levels of FT3 and FT4 in the test group were lower than those in the control group, and the differences were remarkable ( P < 0.05 ). In short, the LGDF algorithm had more ideal segmentation effect. In addition, ultrasound-guided microwave ablation was effective in treating benign thyroid nodules, which could reduce damage to the RLN and maintain normal thyroid function.