Background: Postoperative gastrointestinal dysfunction (PGD) is one of the most common complications among patients who have undergone thoracic surgery. Acupuncture has long been used in traditional Chinese medicine to treat gastrointestinal diseases and has shown benefit as an alternative therapy for the management of digestive ailments. This study aimed to explore the therapeutic effectiveness of acupuncture as a means to aid postoperative recovery of gastrointestinal function in patients undergoing thoracoscopic surgery. Methods: In total, 112 patients aged 18–70 years undergoing thoracoscopic surgery between 15 June 2022 and 30 August 2022 were randomized into two groups. Patients in the acupuncture group (AG) first received acupuncture treatment 4 h after surgery, and treatment was repeated at 24 and 48 h. Patients in the control group (CG) did not receive any acupuncture treatment. Both groups received the same anesthetic protocol. Ultrasound-guided thoracic paravertebral block (TPVB) was performed in the paravertebral spaces between T4 and T5 with administration of 20 mL of 0.33% ropivacaine. All patients received patient-controlled intravenous analgesia (PCIA) after surgery. Results: Median time to first flatus [interquartile range] in the AG was significantly less than in the CG (23.25 [18.13, 29.75] vs 30.75 [24.13, 45.38] h, p < 0.001). Time to first fluid intake after surgery was significantly less in the AG, as compared with the CG (4 [3, 7] vs 6.5 [4.13, 10.75] h, p = 0.003). Static pain, measured by visual analog scale (VAS) score, was significantly different on the third day after surgery (p = 0.018). Dynamic pain VAS scores were lower in the AG versus CG on the first three postoperative days (p = 0.014, 0.003 and 0.041, respectively). Conclusion: Addition of acupuncture appeared to improve recovery of postoperative gastrointestinal function and alleviate posteoperative pain in patients undergoing thoracoscopic surgery. Acupuncture may represent a feasible strategy for the prevention of PGD occurrence. Trial registration number: ChiCTR2200060888 (Chinese Clinical Trial Registry)