Abstract: [Objective] To assess the impact of depression on total knee arthroplasty (TKA) outcomes by using the large-scale PearlDiv-er database. [Methods] A total of 126 513 patients with depression and 126 513 patients without depression who underwent primary TKA between 2010 and 2022 were identified and matching selected from the PearlDiver database. Multivariable regression analysis was performed to compare medical complications within 90 days postoperatively and surgical complications within 5 years between the two groups. [Results] Within 90 days postoperatively, the depression group proved significantly higher than the non-depression group in terms of pneumonia incidences [n (%), 1 766 (1.40) vs 1 225 (0.97), P<0.001], cerebrovascular accident [929 (0.7) vs 657 (0.5), P<0.001], deep vein thrombosis [3 057 (2.4) vs 2 738 (2.2), P<0.001], blood transfusion [3 213 (2.5) vs 2 518 (2.0), P<0.001], acute kidney damage [2 214 (1.8) vs 1 859 (1.5), P<0.001], urinary tract infection [6 388 (5.1) vs 4 855 (3.8), P<0.001], sepsis [902 (0.7) vs 575 (0.5), P<0.001] and wound complications [1 667 (1.3) vs 1 226 (1.0), P<0.001]. In addition, the depression group was also significantly greater than the non-depression group in terms of incidence of periprosthetic joint infection, prosthesis instability, periprosthetic fracture and revision TKA 90 days, 1 year, 2 years and 5 years after surgery (P<0.001). The depression group also had significantly higher chance of emergency department visits and readmission than the non-depression group within 90 days after surgery (P<0.001). The depression group proved significantly higher incidence of aseptic loosening than the non-depression group 1, 2 and 5 years after surgery (P<0.001). However, the depression group had significantly lower number of manipulation under anesthesia (MUA) than the non-depression group 90 days, 1 year, 2 years and 5 years after TKA (P<0.001), and there were no a significant difference in the incidence of aseptic loosening between the two groups 90 days after surgery (P= 0.042). [Conclusion] The depression before TKA is associated with higher risk of medical and surgical complications, which should be evaluated carefully, and take better perioperative planning and more detailed post-operative management to improve surgical outcomes.