ObjectiveHow to minimize postoperative pain following knee replacement surgery has been a great challenge. This study was performed to evaluate the effect of applying a topical nonsteroidal anti‐inflammatory drug (NSAID) lateral to the incision for postoperative pain following unicompartmental knee arthroplasty (UKA).MethodsThe randomized controlled trial enrolled 100 patients from August 2023 to January 2024. One hundred patients who underwent UKA were randomized into two groups. The intervention group received a topical NSAID lateral to the incision postoperatively, and the control group received a placebo lateral to the incision postoperatively. The primary outcome measures were the amount of opioid consumption and the visual analogue scale (VAS) score (12, 24, 36, 48, and 72 h after operation) for pain. The secondary outcome measures were the American Knee Society Score (AKSS, preoperation and 1‐month follow‐up after operation), the time of first analgesic demand, side effects of opioids, operation time, postoperative stay, surgery‐related complications, and postoperative incision healing grade. Independent sample t test and paired sample t test were used to compare continuous data. Chi‐square test and Fisher's precision probability tests were used to analyze the categorical data.ResultsNinety‐eight patients (intervention group, 48 patients; control group, 50 patients) were analyzed. Opioid consumption was significantly lower in the intervention group than in the control group during the first 12 h, 12 to 24 h, and 24 to 48 h postoperatively (p < 0.05). The VAS score for pain within 72 h postoperatively was significantly lower in the intervention group than in the control group (p < 0.05). There was no significant difference in the AKSS, operation time, postoperative stay, complications, or postoperative incision healing grade between the two groups. The time of first analgesic demand for patient‐controlled analgesia was significantly later in the intervention group than in the control group (p < 0.05). There were fewer side effects of opioids in the intervention group (8.3%) than in the control group (18.0%).ConclusionPostoperative application of topical NSAIDs lateral to the incision is an effective and safe method for pain management after UKA, helping to decrease the pain score and reduce opioid consumption postoperatively with no increase in side effects.