Importance Guidelines recommend using gabapentin to decrease postoperative pain and opioid use, but significant variation exists in clinical practice. Objective To determine the effect of perioperative gabapentin on remote postoperative time to pain resolution and opioid cessation. Design, Setting, and Participants A randomized, double-blind, placebo-controlled trial of perioperative gabapentin was conducted at a single-center, tertiary referral teaching hospital. A total of 1805 patients aged 18 to 75 years scheduled for surgery (thoracotomy, video-assisted thoracoscopic surgery, total hip replacement, total knee replacement, mastectomy, breast lumpectomy, hand surgery, carpal tunnel surgery, knee arthroscopy, shoulder arthroplasty, and shoulder arthroscopy) were screened. Participants were enrolled from May 25, 2010, to July 25, 2014, and followed up for 2 years postoperatively. Intention-to-treat analysis was used in evaluation of the findings. Interventions Gabapentin, 1200 mg, preoperatively and 600 mg, 3 times a day postoperatively or active placebo (lorazepam, 0.5 mg) preoperatively followed by inactive placebo postoperatively for 72 hours. Main Outcomes and Measures Primary outcome was time to pain resolution (5 consecutive reports of 0 of 10 possible levels of average pain at the surgical site on the numeric rating scale of pain). Secondary outcomes were time to opioid cessation (5 consecutive reports of no opioid use) and the proportion of participants with continued pain or opioid use at 6 months and 1 year. Results Of 1805 patients screened for enrollment, 1383 were excluded, including 926 who did not meet inclusion criteria and 273 who declined to participate. Overall, 8% of patients randomized were lost to follow-up. A total of 202 patients were randomized to active placebo and 208 patients were randomized to gabapentin in the intention-to-treat analysis (mean [SD] age, 56.7 [11.7] years; 256 (62.4%) women and 154 (37.6%) men). Baseline characteristics of the groups were similar. Perioperative gabapentin did not affect time to pain cessation (hazard ratio [HR], 1.04; 95% CI, 0.82-1.33; P = .73) in the intention-to-treat analysis. However, participants receiving gabapentin had a 24% increase in the rate of opioid cessation after surgery (HR, 1.24; 95% CI, 1.00-1.54; P = .05). No significant differences were noted in the number of adverse events as well as the rate of medication discontinuation due to sedation or dizziness (placebo, 42 of 202 [20.8%]; gabapentin, 52 of 208 [25.0%]). Conclusions and Relevance Perioperative administration of gabapentin had no effect on postoperative pain resolution, but it had a modest effect on promoting opioid cessation after surgery. The routine use of perioperative gabapentin may be warranted to promote opioid cessation and prevent chronic opioid use. Optimal dosing and timing of perioperative gabapentin in the context of specific operations to decrease opioid use should be addressed in further research. Trial Registration clinicaltrials.gov Identifier:NCT01067144