Background. Trichophyton rubrum, among other dermatophytes, is a major causative agent for superficial dermatomycoses like onychomycosis and tinea pedis, especially among pediatric and geriatric populations. Ellagic acid (EA) and shikonin (SK) have been reported to have many bioactivities, including antifungal activity. However, the mechanism of EA and SK on Trichophyton rubrum has not yet been reported. Objectives. The purposes of this study were to evaluate the antifungal activities of EA and SK against Trichophyton rubrum and to illuminate the underlying action mechanisms. Methods. The effect of EA (64, 128, and 256 μg/mL) and SK (8, 4, and 2 μg/mL) on Trichophyton rubrum was investigated with different doses via detecting cell viability, ultrastructure with using a scanning electron microscope (SEM), cell apoptosis and necrosis by using the flow cytometry instrument technique (FCIT), and the ergosterol biosynthesis pathway‐related fungal cell membrane key gene expressions in vitro. Results. SEM detection revealed that the T. rubrum cell surface was shrivelled, folded, and showed deformation and expansion, visible surface peeling, and broken hyphae, and cell contents overflowed after being treated with EA and SK; the cell apoptosis rate was significantly increased in dose‐dependent manner after T. rubrum was treated with EA and SK; the qPCR results showed that mRNA expression of MEP4 and SUB1 was downregulated in EA‐ and SK‐treated groups. Conclusions. Overall, our results revealed the underlying antifungal mechanism of EA and SK, which may be related to the destruction of the fungal cell membrane and inhibition of C14 demethylase and the catalytic rate of squalene cyclooxidase in the ergosterol biosynthesis pathway via downregulation of MEP4 and SUB1, suggesting that EA and SK have the potential to be developed further as a natural antifungal agent for clinical use.