The purpose of this study was to assess prospectively the effects of midurethral sling surgery on sexual function and activity. Sexual activity and function was assessed in 597 women with stress urinary incontinence who were enrolled in a randomized equivalence trial of retropubic compared with transobturator midurethral slings. Repeated measures analysis of variance was used to assess changes in Pelvic Organ Prolapse/Urinary Incontinence Sexual Questionnaire scores over a 2-year period. Significant, similar improvements in sexual function were seen in both midurethral sling groups. Mean Pelvic Organ Prolapse/Urinary Incontinence Sexual Questionnaire scores increased from 32.8 at baseline to 37.6 at 6 months and 37.3 at 24 months (P < .0001). Dyspareunia, incontinence during sex, and fear of incontinence during sex each significantly improved after surgery. Preoperative urge incontinence was associated with abstinence after surgery (P = .02); postoperative urge incontinence negatively impacted sexual function (P = .047). Midurethral sling surgery for stress urinary incontinence significantly improves sexual function, although coexistent urge incontinence has a negative impact.