Background: Risk factors for sepsis have not been assessed in patients receiving tumor necrosis factor-alpha inhibitors (TNFi) for immune-mediated inflammatory diseases (IMIDs) who are vulnerable to serious/hospitalized infections. Methods: Data from 2003–2017 were obtained from Taiwan’s National Health Insurance Research Database to identify patients receiving TNFi, including etanercept, adalimumab, and golimumab, for IMIDs including rheumatoid arthritis (RA), ankylosing spondylitis (AS), psoriasis (PsO), psoriatic arthritis (PsA), Crohn’s disease (CD), and ulcerative colitis (UC). To investigate risk factors for sepsis, we used the Sepsis-3 definition and calculated hazard ratios (HRs) with 95% confidence intervals (CIs) using Cox regression analysis. Results: There were 17,764 patients (mean age 49.3 ± 14.3 years; females, 57.6%) receiving TNFi for IMIDs, including RA (58.6%), AS (19.1%), PsO (15.1%), PsA (2.5%), CD (3.0%), and UC (1.7%). The overall incidence rate of sepsis was 1088 per 100,000 person-years. After adjustment for potential confounders, recent sepsis within 3 months before TNFi initiation (HR, 2.35; 95% CI, 1.73–3.20), CD (HR, 3.36; 95% CI 2.11–5.34; reference group: AS) and glucocorticoid use (prednisolone-equivalent dose, mg/day HR, 1.05; 95% CI, 1.05–1.06) were associated with the risk of sepsis. Intriguingly, golimumab users appeared to have a lower risk of sepsis compared with etanercept users (HR, 0.56; 95% CI, 0.38–0.83). In addition, socioeconomic status, including urbanization level and insured amount, was associated with sepsis in a dose-response manner. Conclusions: Recent sepsis, CD, concomitant glucocorticoid use, and low socioeconomic status, which were associated with an increased risk of sepsis, are crucial for individualized risk management plans.