The absence of CXCL2 resulted in improved retinal function after B. cereus infection. Eyes of CXCL2−/− and C57BL/6J (C57) male and female mice were infected with 100 CFU B. cereus. Retinal function was assessed by ERG at 8, 10, 12, 14, and 16 hours postinfection. In infected CXCL2−/− eyes, retained A‐ and B‐wave responses were significantly greater than retained A‐ and B‐wave responses in infected C57BL/6J eyes (A and C). A sex-related difference in retinal function was only observed at 8 hours (P = 0.0491) and 12 hours (P = 0.0411) time points with CXCL2−/− mice. Values represent means ± SEM of n ≥ 6 eyes at each time point with at least 3 independent experiments. *P ≤ 0.05, **P ≤ 0.01, ***P ≤ 0.001, ****P ≤ 0.0001, and nsP ≥ 0.05.