The dynamical behaviors of Bose-Einstein condensates (BECs) depend largely on the nonlinear interactions between BEC atoms. The advancement of experimental techniques enables the rapid and effective modulation of the nonlinear interactions through Feshbach resonance technique. At present, both the nonlinear time-varying interaction and nonlinear space-varying interaction have been realized, respectively, thus making it possible to simultaneously modulate the nonlinear interactions in time and space through the combination of techniques. It will provide more options to conduct various studies by manipulating the BECs. Therefore, BECs with time- and space-varying interactions must possess unique advantages in studying BEC dynamics.This paper focuses on the chaotic spatiotemporal dynamics of BECs with nonlinear time- and space-varying interactions in moving optical lattices. When the intensities of the moving optical lattice potential and the modulation of the nonlinear interaction are small, the system satisfies the perturbation conditions and the Melnikov-function method is used in the theoretical analyses to obtain the Melnikov spatiotemporal chaotic criterion of the system. When the system does not meet the perturbation conditions, numerical simulations show that for a BEC with an attractive atomic interaction, increasing the modulation intensity of the nonlinear interaction can deepen the degree of spatiotemporal chaos in the system. In certain parameter regions, the modulation frequency of the nonlinear interaction can have a significant influence on the spatiotemporal dynamical behavior of the system. Further numerical research results show that larger chemical potentials can suppress the spatiotemporal chaos not only in the attractive BEC but also in the repulsive BEC. Based on the above research results, spatiotemporal chaos in BEC system can be avoided or triggered off in experiments as needed.