Abstract The whitefly Bemisia tabaci is a cosmopolitan, polyphagous agricultural pest that poses serious threats to agricultural production globally. Beauveria bassiana, an entomopathogenic fungi (EPF), cannot only directly kill a variety of pests but also inhibit the occurrence of pests as fungal endophytes within plants. In this study, we explored how the introduction of B. bassiana as endophytes into tomatoes (Solanum lycopersicum) affected the fitness and feeding behaviour of whiteflies. The results showed a significant difference in the fertility of B. tabaci on tomatoes treated with B. bassiana by root irrigation, B. bassiana by local leaf spraying, and 0.05% Tween 80 solution, among which the number of eggs laid was the lowest on tomatoes treated with B. bassiana by root irrigation. Furthermore, B. tabaci fed on tomatoes treated with EPF by root irrigation showed a significantly higher mortality rate in each stage than control plants treated with 0.05% Tween 80 by constructing an age-stage, two-sex life table. In addition, the intrinsic rate of increase (r), the finite rate of increase (λ) and the net reproductive rate (R0) of the B. tabaci population on tomatoes treated with EPF by root irrigation were all significantly lower than those of the control. Moreover, tomatoes treated by root irrigation had a significant negative effect on the feeding behaviour of B. tabaci by shortening the duration of watery salivation and phloem ingestion. Our results indicated that B. bassiana effectively inhibited the occurrence of whitefly as endophytes. These findings enhanced our understanding of the inhibition of endophytic EPF on pests.