Abstract Background The postoperative pain after percutaneous nephrolithotomy (PCNL) can be managed by many peripheral blocks techniques (e.g., paravertebral and quadrates lumborum block), and local anesthesia infiltration. Therefore, this prospective study was conducted to evaluate the effect of quadratus lumborum type III versus peritubal local infiltrating on postoperative analgesia for patients undergoing PCNL under general anesthesia. Methods Eligible subjects after exclusion of COVID-19 patients, with renal stones less than 2 cm undergoing PCNL surgery under general anesthesia. Exclusion criteria were: 21<years of age or > 60 years of age; bleeding disorders; allergies to local anesthetics; psychiatric patients; and American Society of Anesthesia (ASA) physical status III and IV. Eighty patients were randomly allocated to 2 equal groups. In the Quadratus group, participant received 20 mL of bupivacaine 0.25% in the fascial plane between the quadratus lumborum and Psoas muscle; and in the peritubal group, patients received 10 mL of bupivacaine 0.25% around the nephrostomy tube at 6 and 12 o’clock positions (total 20 mL). The quadratus lumborum block and peritubal infiltration were performed by the primary investigator and the urologist, respectively. All patients received standard postoperative analgesia (paracetamol, ketorolac, and morphine via patient-controlled analgesia. Both patients and Data collecting staff were blinded to study group. Primary outcome was the visual analogue score at rest and on coughing or movement at 2, 4, 6, 12, and 24 hours. Secondary outcomes were 24 hours total morphine consumption, 1st use of morphine pump, incidence of side effects (pruritis and nausea and vomiting) and patient satisfaction. Results Data were analyzed from 78 patients (39 patients in each group). The mean resting VAS score in quadratus group at 6 and 12 hours was (3), while the mean VAS in peritubal group was (5) and (6) at 6 and 12 hours, respectively. Dynamic VAS score in peritubal group at 6 hours was (mean 6) with p<0.0001 when compared to resting value. The 24 hours’ morphine consumption was 8.5-11 mg and 1619 mg, in quadratus and peritubal group, respectively (the difference in mean of 9 at the 95% confidence interval; p<0.0001). patients start to use morphine pump after 121.4 min and 180.2 min in group peritubal and quadratus, respectively. Patients in group quadratus were statistically more satisfied, in both groups incidence of complication was low. Conclusion Quadratus Lumborum block was more effective than Peritubal LA infiltration regarding postoperative VAS score both at rest and during movement with lower postoperative morphine consumption and more satisfaction in patients undergoing PCNL surgery. Trial registration This prospective randomized trial was registered at Clinical Trials.gov in December, 2019. https://clinicaltrials.gov/ct2/show/NCT04215705.