The use of biological agents and immunomodulators for inflammatory bowel disease (IBD) has remarkably improved disease management in the current era but at the same time has increased the risk of infectious complications. Patients with IBD on corticosteroids, immunomodulators, and biological agents are considered immunocompromised and are at risk for opportunistic infections. These are infections caused by organisms that take advantage of a weakened immune system, and cause disease, when they ordinarily would cause mild illness or no disease in an immunocompetent host. Risk factors for opportunistic infections include malnutrition, older age, congenital immunodeficiency, HIV infection, chronic diseases, and use of corticosteroids, immunomodulators, and anti–tumor necrosis factor alpha therapy. Apart from immunosuppressive medications and older age, there is only indirect evidence for above risk factors contributing directly to opportunistic infection risk in patients with IBD. Opportunistic infections in patients with IBD include viral infections (herpes viruses, human papillomavirus, influenza virus, and JC virus), bacterial infections (tuberculosis, nocardiosis, Clostridium difficile infection, pneumococcal infection, legionellosis, and listeriosis), fungal infections (histoplasmosis, cryptococcosis, Pneumocystis jirovecii infection, aspergillosis, and candidiasis), and parasite infections (Strongyloides stercoralis). Although these infections lead to high morbidity and mortality, only a minority of patients with IBD develop opportunistic infections. Currently, we lack a test to accurately predict patients at risk of opportunistic infection, and future research needs to focus on biomarkers or predictive models for risk stratification. Until such a test is developed, we need to screen, prevent, diagnose, and treat opportunistic infections in all patients with IBD in a timely manner.