Introduction The rising prevalence of obesity has increased the demand for total knee arthroplasty (TKA), but the impact on outcomes, particularly in Class I and II obesity, remains inconclusive. This study aimed to compare early in-hospital post-TKA outcomes in older patients with Class I (BMI 30-34.9 kg/m(2)) and Class II obesity (BMI 35-39.9 kg/m(2)). Materials and methods Using data from the Nationwide Inpatient Sample (2016-2019), patients aged 65 and above who underwent TKA were categorized into Class I (n = 133,425) and Class II obesity groups (n = 122,432). Propensity score matching balanced baseline characteristics. Primary outcomes included in-hospital mortality and early postoperative complications. Results Post-matching, a higher prevalence of type 2 diabetes was found in the Class II obesity group (32.5% vs. 29.5%, P = 0.001). The Class II group had a significantly higher risk of in-hospital mortality (9.004-fold, 95% CI: 3.57-22.68, P < 0.001), acute kidney injury (45.8% increase, 95% CI: 1.383-1.537, P < 0.001), and postoperative pneumonia (32.5% increase, 95% CI: 1.095-1.604, P = 0.004). The risk of blood loss anemia was 3.3% lower in the Class II group (95% CI: 0.946-0.988, P = 0.002). No significant differences were found in heart failure, acute coronary artery disease, pulmonary edema, venous thromboembolism, pulmonary embolism, and blood transfusion. Conclusions More intensive monitoring and preventive measures may be necessary for patients with Class II obesity to mitigate the heightened risks associated with TKA compared to those with Class I obesity.