Obesity and diabetes are among the greatest risk factors for infection following total joint arthroplasty. However, the underlying mechanism of susceptibility is unclear. We compared orthopedic implant-associated Staphylococcus aureus infections in type 1 (T1D) versus type 2 (T2D) diabetic mouse models and in patients with S. aureus infections, focusing on the adaptive immune response. Mice were fed a high-fat diet to initiate obesity and T2D. T1D was initiated with streptozotocin. Mice were then given a trans-tibial implant that was precoated with bioluminescent Xen36 S. aureus. Although both mouse models of diabetes demonstrated worse infection severity than controls, infection in T2D mice was more severe, as indicated by increases in bioluminescence, S. aureus CFU in tissue, and death within the first 7 days. Furthermore, T2D mice had an impaired humoral immune response at day 14 with reduced total IgG, decreased S. aureus-specific IgG, and increased IgM. These changes were not present in T1D mice. Similarly, T2D patients and obese nondiabetics with active S. aureus infections had a blunted IgG response to S. aureus. In conclusion, we report the first evidence of a humoral immune deficit, possibly due to an immunoglobulin class switch defect, in obesity and T2D during exacerbated S. aureus infection which may contribute to the increased infection risk following arthroplasty in patients with T2D and obesity.