Background Transversus abdominis plane (TAP) block is suitable for unilateral urologic surgeries. Blind TAP block has many complications and uncertainty regarding its effects. Use of ultrasonography increases the safety and efficacy. This study was conducted to evaluate the analgesic efficacy of ultrasound-guided TAP block compared with wound infiltration with bupivacaine (0.25%) in patients undergoing urologic surgeries. Patients and methods In a prospective study, 30 patients undergoing elective unilateral urological surgeries such as nephrolithotomy were allocated into two groups: the TAP group and the infiltration group. The TAP group ( n = 15) received TAP block with 0.25% bupivacaine (50 ml), and in the infiltration group ( n = 15) the skin and subcutaneous tissues of the surgical incision and deep muscle layers were infiltrated with 0.25% bupivacaine (50 ml). Pethidine 1 mg/kg was given as rescue analgesic at visual analog scale (VAS) more than 3 at rest and on movement. The total dose of pethidine, VAS at rest and on movement, and sedation scores were recorded. Results Patients of the TAP group had significantly lower VAS score and lower pethidine consumption, and there was a nonsignificant difference between study groups as regards sedation score. Conclusion The ultrasound-guided TAP block is easy to perform and more effective as a postoperative analgesic regimen in urologic surgeries with opioid-sparing effects.