Enhancing crop nutrition though biofortification with essential minerals can, in some circumstances, increase the resistance of plants to the attack by pathogens. As a result, plants activate their defense mechanisms and produce bioactive compounds (BCs) in response. To date, there has been no investigation into the response of green bean plants fortified with magnesium (Mg) salts to the presence of Colletotrichum lindemuthianum. This research involved two Mg sources applied by the edaphic route. The pathogen was inoculated on green bean pods, and subsequent analysis was conducted on the accumulation of BCs, including total anthocyanins, total phenols, and total flavonoids, within both symptomatic and healthy tissues. Remarkably, the plant’s defense system was activated, as evidenced by the significantly higher concentration of anthocyanins (p ≤ 0.05) observed in the symptomatic tissues following treatments with both MgCl2 and MgSO4. Further, green bean plants treated with MgSO4 displayed notably elevated concentrations of phenols (p ≤ 0.05) in the inoculated tissues of the pods, suggesting a plausible plant defense mechanism. The levels of BCs were considerably higher in green bean pods of the biofortified plants compared to those which were nonbiofortified. However, perhaps one of the most noteworthy findings is that there were no discernible differences between biofortified and nonbiofortified treatments in stopping anthracnose in green bean pods. These results provide valuable insights contributing to a deeper understanding of this interaction.