Endophytes can benefit the growth and stress resistance of host plants by secreting bioactive components. Thiamine is an essential vitamin involved in many metabolic pathways and can only be synthesized by microbes and plants. In this study, we found that thiamine could inhibit the development of the phytopathogen Magnaporthe oryzae and decrease the rice blast index under field conditions. In the thiamine biosynthesis pathway, the key enzyme ShTHIC of an endophyte Streptomyces hygroscopicus OsiSh-2 and OsTHIC of rice (Oryza sativa) were highly homologous. Gene overexpression or knockout approaches revealed that both THIC contributed to thiamine synthesis and resistance to M. oryzae. Furthermore, S. hygroscopicus OsiSh-2 colonization led to a decrease in the thiamine synthesis level of rice but still maintained thiamine homeostasis in rice. However, inoculation with the ShTHIC knockout strain ΔTHIC reduced the thiamine content in rice, although the thiamine synthesis level of rice was increased. After infection with M. oryzae, blast resistance was dramatically improved in OsiSh-2-inoculated rice but decreased in ΔTHIC-inoculated rice compared with non-inoculated rice. This result demonstrated that ShTHIC could regulate thiamine biosynthesis and consequently assist blast resistance in the OsiSh-2-rice symbiont. Our results revealed a novel blast-resistance mechanism mediated by a key thiamine biosynthetic enzyme from an endophyte OsiSh-2.