Due to the intelligence and opening of future generation cyber–physical power systems, smart grids are vulnerable to the emergency of cyber-attacks aiming at the cyber–physical systems. Among these attacks, false data injection (FDI) attacks are particularly concerning in smart grids due to their stealthiness. Attackers can tamper with data transmitted through communication networks, influencing the analysis results of the control center, leading it to make wrong decisions and thereby undermining the stability of smart grids. The inability of traditional bad data detection models to detect false data injection attacks poses huge security risks to smart grids. For this reason, a new attack detection model using spatial–temporal features is proposed. The proposed detection model includes the following two parts: spatial features extraction and temporal convolutional network. First, graph convolutional operations are employed to disentangle the interactions among buses and extract spatial features of measurement; Then, the temporal convolutional network model is used to extract the temporal features. Through these processes, the proposed detection model can effectively identify the injected false data injection attacks in smart grids. The detection performance and robustness of the proposed FDI attack detection model are tested through simulations on IEEE 14-bus and 118-bus grid systems.