Patellar resurfacing (PR) and peripheral patellar denervation (PD) are common surgical treatments for knee osteoarthritis (KOA) in total knee arthroplasty (TKA). The aim of study was to compare preventive effect on postoperative anterior knee pain (AKP) between PR and peripheral PD in TKA. A total of 202 patients who underwent unilateral TKA were randomized into 3 groups: T, TPD, and TPR. Patients in T group received simple TKA, patients in TPD group received TKA combined PD while patients in TPR group received TKA combined PR. Incidence, intensity, and presentation time of AKP and clinical outcomes were evaluated at 3, 6, 9, 12, 18, and 24 months postoperatively. The incidence of AKP was significantly lower and the intensity of AKP and patients’ satisfaction score were significantly better at 3 months after surgery in group TPD and TPR compared with group T. Compared with group TPR, the intensity of AKP was significantly better at 3 months after surgery in group TPD. There were no significant difference in Oxford knee score, range of motion (ROM), patellar score, knee society score (KSS) and activities of daily living (ADL) score among 3 groups in the follow-up period. Both PD and PR can effectively reduce the intensity and incidence of AKP after TKA and improve patients’ satisfaction at 3 months after TKA. Additionally, PD is more effective on alleviating AKP than PR.