We conducted a matched case-control study to determine risk factors for the development of prosthetic joint infection. Cases were patients with prosthetic hip or knee joint infection. Controls were patients who underwent total hip or knee arthroplasty and did not develop prosthetic joint infection. A multiple logistic regression model indicated that risk factors for prosthetic joint infection were the development of a surgical site infection not involving the prosthesis (odds ratio [OR], 35.9; 95% confidence interval [CI], 8.3–154.6), a National Nosocomial Infections Surveillance (NNIS) System surgical patient risk index score of 1 (OR, 1.7; 95% CI, 1.2–2.3) or 2 (OR, 3.9; 95% CI, 2.0–7.5), the presence of a malignancy (OR, 3.1; 95% CI, 1.3–7.2), and a history of joint arthroplasty (OR, 2.0; 95% CI, 1.4–3.0). Our findings suggest that a surgical site infection not involving the joint prosthesis, an NNIS System surgical patient risk index score of 1 or 2, the presence of a malignancy, and a history of a joint arthroplasty are associated with an increased risk of prosthetic joint infection.