To evaluate the utility of galactomannan testing of intraocular fluid in the diagnosis of Aspergillus endophthalmitis (AE). This retrospective study enrolled three groups of patients, including those with 17 eyes with AE; 20 eyes with intraocular infection of bacteria, viruses, or other fungi; and 19 eyes with cataract. Intraocular fluid from all these patients was collected for galactomannan testing. In addition, the receiver operating characteristic curves and diagnostic significance were analyzed. The mean optical density index (ODI) of galactomannan was 5.77 ± 1.73 in the AE group, which was significantly higher than that in the non- Aspergillus intraocular infection group (0.19 ± 0.11, P < 0.001) and the negative control group (0.29 ± 0.27, P < 0.001). The area under the receiver operating characteristic curve (area under the curve) was 1.00 (95% confidence interval, 1.00-1.00; P < 0.001) in the AE group and the other two groups. At a cutoff optical density index of 1.88, the sensitivity and specificity were 100.0% and 100.0%, respectively, and the Youden index reached its highest value of 1.00. Galactomannan testing of intraocular fluid indicated good sensitivity and specificity for the diagnosis of AE, thereby promising a rapid diagnostic modality for AE.