BACKGROUND: We aim to explore whether the effect of oral celecoxib (OC) preoperatively in elderly patients with femoral neck fracture (FNF) receiving surgery on the pain control, complications, functional outcomes, and mortality. METHODS: We collected data on elderly patients with FNF in two hospitals between Jan. 2020 and May. 2024. According to OC use or not, patients were divided into OC group and non-OC group. We performed propensity score matching (PSM) analysis to minimize potential confounding and selection bias. We observed the factors that may influence pain control by Spearman correlations. RESULTS: Finally, 908 patients met our inclusion criteria, including 494 patients in the OC group and 414 in non-OC patients. We found that many factors, such as age, body mass index, and fracture type, were significantly different. Thus, we used PSM analysis to lower potential confounding, and 215 patients remained in each group. The results showed that VAS scores at the time of 1 CONCLUSION: Preoperative OC can manage pain control, have better functional recovery, and minimize pain-related complications such as delirium in elderly patients with femoral neck fracture. LEVEL OF EVIDENCE: Level III.