The bioactivity of plant secondary metabolites is influenced by the plants' environment and the symbiotic endophytic fungi in their tissues. This study aims to compare the effect of differences in agro-climatic conditions and geographical location on phytocompound and the antibacterial activity of Moringa oleifera methanol extract and their endophytic fungi. Samples were collected from 2 locations with different environmental conditions. The phytocompound analysis was conducted with FTIR and GCMS. The antibacterial activity was evaluated to the tested bacteria Escherichia coli, Salmonella typhi, Staphylococcus aureus, and Bacillus subtilis. Analysis of phytocompound revealed endophytic fungi have greater compounds than the leaves. Antibacterial activity in endophyte fungi and leaves in location 2 is higher than in location 2. Two isolates showed the best antibacterial activity from location 1 and location 2. EN5 and J14 had inhibition zones respectively against E. coli (30.5±0.7; 20±0), S. aureus (33.5±1.7; 19±4.2), S. typhi (30.5±0.7; 20±0) and against B. subtilis. (15.3±1.4; 11.5±0.7). Based on this, it was concluded that differences in environmental conditions affect the phytocompounds and bioactivity of Moringa leaves and their colonizing endophytic fungi.