ABSTRACT Background Aminophylline relaxes smooth muscle by inhibiting the phosphodiesterase enzyme and activating protein kinase A, and alleviates inflammation by decreasing the production of leukotrienes. We aimed to assess the effect of intraoperative intravenous (IV) aminophylline on postoperative pain in patients undergoing ureteroscopic lithotripsy. Methods A randomized, placebo-controlled trial was conducted on 50 patients who were scheduled for ureteroscopic lithotripsy under general anesthesia. Patients were divided into two equal groups. Group 1 received 4 mg/kg aminophylline diluted in 100 ml saline 0.9% IV over 20 minutes. Group 2 received saline 0.9% with a similar volume and period as the aminophylline group. Visual analogue scale (VAS) score was recorded at arrival to the post-anesthesia care unit (PACU), 1 h, 2 h, 6 h, 12 h, and 24 h after surgery. Catheter-related bladder discomfort (CRBD) was assessed at PACU arrival, 1 h, 2 h, and 6 h postoperatively. Results VAS measurements at arrival to the PACU, 1 h, 2 h, and 6 h postoperative were significantly lower in group 1 than in group 2 (p < 0.05). Total pethidine consumption in the first 24 hours postoperatively was significantly lower in group 1 (43.04 ± 14.52 mg) than in group 2 (59.32 ± 18.34 mg); p = 0.002. Aminophylline significantly decreased the incidence of moderate-to-severe CRBD at PACU arrival and 1 h after surgery (p = 0.005 and 0.007, respectively). There was no significant variation between both groups regarding side effects. Conclusions In patients undergoing ureteroscopic lithotripsy, intraoperative IV aminophylline infusion reduced postoperative pain and opioid consumption. It also decreased the incidence of early moderate-to-severe CRBD without evidence of intraoperative hemodynamic alterations or postoperative side effects.