To determine the physiological status of the retina of eyes with endophthalmitis by examining the electroretinograms (ERGs) recorded with a portable recording system and to determine whether the pretreatment ERG findings were correlated with the best-corrected visual acuity (BCVA) after the treatment. We examined the medical records of 118 eyes of 108 patients who were diagnosed and treated for infectious endophthalmitis at Saitama Medical University Hospital, Japan, between January 2015 to November 2022. Of these, we studied the 25 eyes of 21 patients who had been evaluated by electroretinography. In bilateral cases, one eye was analyzed. The eyes were classified into those with postoperative endophthalmitis (group S, n = 12) and those with endogenous endophthalmitis (group E, n = 9). Photopic and flicker ERGs were recorded with the RETeval system. The pretreatment clinical factors studied were the ERG components that might be correlated with the post-treatment BCVA. Eyes in Group E with larger amplitude flicker ERGs (P = 0.0053, ρ = -0.8333) had better BCVA after treatment. In Group S, eyes with larger amplitude flicker ERGs (P = 0.0086, ρ = -0.7173), photopic a-waves (P = 0.0323, ρ = 0.6177), and photopic b-waves (P = 0.0055, ρ = -0.7443) had better BCVA after treatment. Simple and rapid ERG evaluations under light-adapted condition are helpful in evaluating the pretreatment retinal function and to determine the visual prognosis in eyes with endophthalmitis. Simple and non-time-consuming ERG evaluations are helpful in evaluating the retinal function in eyes with endophthalmitis and predicting the visual prognosis.