Autoimmune hemolytic anemia (AIHA) is a rare and sometimes life-threatening disease. Infections are frequent and often severe during the course of AIHA. Rituximab is commonly used to treat patients with AIHA. This study aimed to assess the risk of hospitalization with infection after rituximab in patients with primary AIHA. We selected all adult patients newly diagnosed for primary AIHA and treated with rituximab between 2012 and 2018 in the French National Health Database. Patients were considered exposed to rituximab within 6 months after the first infusion. The main outcome was hospitalization with infection, identified by a discharge diagnosis of infection during the rituximab exposure. The cohort consisted of 959 patients (mean age of 67 years, standard deviation of 17.8 years; 60.5% of women). The 6-month cumulative incidence of hospitalization with infection was 17.6% (95%CI: 15.2-20.0). The most frequently characterized infections were pulmonary (40.2%). Opportunistic infections were observed in 28 (16.6%) patients, including 11 cases of pneumocystosis. All cases of pneumocystosis occurred in patients concomitantly exposed to corticosteroids, none of them had prophylaxis and all but 2 were aged ≥70 years. Overall, the main factors associated with hospitalization with infection were an age ≥70 years and the exposure to corticosteroids. The 30-day overall mortality after hospitalization with infection was 12.5% (95%CI: 8.0-18.0). In conclusion, the incidence of hospitalizations with infection, including opportunistic infections, is high in adult patients with primary AIHA treated with rituximab, as well as the subsequent mortality. Pneumocystosis prophylaxis should be encouraged in elderly patients exposed to corticosteroids.