This article studies the problem of nonfragile integral-based event-triggered control for uncertain cyber-physical systems under cyber-attacks. An integral-based event-triggered scheme is proposed to reduce the data transmissions and save the limited network resources. The triggering condition is related to the mean of system state over a finite time interval instead of instant system state. Random cyber-attacks in a communication channel are taken into account and described by a stochastic variable subject to Bernoulli distribution. A novel Lyapunov–Krasovskii functional based on Legendre polynomials is constructed, and the Bessel–Legendre inequality technique is employed to handle the integral term induced by the integral-based event-triggered scheme. Resorting to these treatments, sufficient conditions are established via a set of linear matrix inequalities to guarantee the asymptotic mean-square stability of the closed-loop system. Finally, a numerical example shows that the presented method is effective.