Effective postoperative pain control in microdiscectomy surgery is crucial to managing the disease and improving the patient's quality of life. Therefore, this study aimed to assess the potential effectiveness of 2% lidocaine in reducing pain immediately after discectomy surgery. A total of 60 patients who underwent microdiscectomy surgery were enrolled in this randomized clinical trial study. They were randomly assigned to three groups: one group received lidocaine just before the incision, another group received lidocaine just before closing the incision, and the third group served as the control. Pain scores were measured at 1, 2, 3, 4, 8, and 12 h after the surgery using a Visual Analogue Scale. The demographic and clinical characteristics of the study population, including age, weight, length of surgery, gender, and history of diabetes, hypertension, and previous surgery, were comparable across all three groups (P>0.05). There was a significant reduction in pain scores over time in the groups that received lidocaine before (P<0.001) and during surgery (P=0.002). Moreover, there were significant differences in pain scores at all time points among the three groups. Both groups receiving lidocaine showed significantly lower pain scores than the control group (Pbefore surgery=0.005 and Pduring surgery<0.001). However, no significant difference was observed between the groups receiving lidocaine (P=0.080). These findings highlight the effectiveness of a local injection of 2% lidocaine either before or during the surgery in managing post-incisional surgical pain after discectomy.