Introduction Cocaine is a commonly abused stimulant that can affect surgical outcomes. The purpose of our study is to better understand the associations and effects of a reported history of cocaine use in patients undergoing total knee arthroplasty (TKA) compared to patients with no prior cocaine use. Methods 558,371 TKA patients were identified from 2016 to 2019 in the National Inpatient Sample (NIS) database using ICD-10 CM/PCS codes. We compared the demographics, comorbidities, postoperative complications, length of hospital stay, and incurred financial charges of 263 TKA patients with a history of cocaine use (group 1) to 558,108 TKA patients with no prior cocaine use (group 2). Results Group 1 had a higher percentage of males (p < 0.001), lower average age at the time of TKA (p < 0.001), and a larger racially Black and Other (p < 0.001) population compared to group 2. Group 1 had higher rates of obesity (p < 0.001), schizophrenia (p < 0.001), mood disorder (p < 0.001), and anxiety disorder (p < 0.001). However, group 1 had less tobacco use (p = 0.002). Group 1 had an increased postoperative rate of acute renal failure (p = 0.003, OR = 2.36, CI: [1.32, 4.22]) and periprosthetic infection (p < 0.001, OR = 5.37, CI: [3.13, 9.20]) when compared to group 2. Group 1 also spent more days at the hospital (p < 0.001) and incurred higher total charges in dollars (p < 0.001). Conclusion Patients with a reported history of cocaine use were primarily men, Black, and had a lower average age of TKA with significant preoperative comorbidities of obesity, schizophrenia, mood disorder, and anxiety disorder. Cocaine use was associated with extended hospital stays, more expensive charges, and postoperative complications of acute renal failure and periprosthetic infection after TKA. However, more research is needed concerning cocaine dosage, route of administration, and chronicity of usage prior to TKA.