This paper aimed to study the application value of Internet of Things (IoT) edge computing algorithm-based ultrasound-guided erector spinae plane block combined with edaravone anesthesia in thoracoscopic lobectomy. A total of 110 patients undergoing thoracoscopic resection were selected as subjects. The patients were anesthetized with erector spinae plane block combined with edaravone before surgery and underwent chest ultrasound scan. IoT edge computing algorithm was constructed and applied to ultrasound images of patients to enhance and denoise the images. It was found that, in different mixed noise mixtures (Gaussian noise 10% + speckle noise 90%; Gaussian noise 30% + speckle noise 70%), the edge computing algorithm can still maintain the edge information of the output image, showing better performance on edge information detection and denoising compared with the Prewitt and Canny operator. In addition, visual analog scale (VAS) scores decreased with postoperative time after edaravone anesthesia induction and erector spinae plane block lobectomy and reached the lowest level after five days. In short, erector spinae plane block combined with edaravone showed good sedative and analgesic effects on patients undergoing thoracoscopic lobectomy. Ultrasound images processed by IoT edge computing algorithm showed high accuracy in the identification of lung lesions, which was worth applying to clinical diagnosis.