Multidrug-resistant (MDR) bacteria infections become a serious problem for these several decades. To solve this issue, finding of new antibiotics candidate in an urgency. Natural pigment is known to has biological activity against pathogenic bacteria. Coastal fungi are unexplored source of natural pigment to fight MDR bacteria. This research was aimed to isolate coastal endophytic fungi from smooth ant plant (Hydophytum formicarum), to screen endophytic fungi which produce red pigment, to extract the red pigment, to determine antibacterial activity of the red pigment and to identify the coastal endophytic fungi producing the red pigment. In this study, 7 fungi were isolated as endophytic fungi from H. formicarum. There were 3 isolates which produced extracellular pigment i.e. RS 1A which produced red pigment, RS 3 produced black pigment and RS 6A produced yellow pigment. Our study focused on red pigment which is produced by endophytic fungus strain RS 1A. The yield of red pigment was 8.8657% (w/w). This study showed that red pigment had antibacterial activity against Escherichia coli, Acinetobacter baumannii and Proteus mirabilis strain MDR. Judging from molecular and morphological identification, the endophytic fungus strain RS 1A was identified as Aspergillus versicolor.