Data center infrastructures require constant monitoring to ensure stable and reliable operation and time-series forecasting plays an indispensable role in intelligent operations and maintenance in data centers. However, the potential for accurate time-series predictions is often limited due to the overlooked relationships between data records from independent sensors. Inferring relationships for a potential graph representation of a data center is challenging due to complex relationships between nodes and multiple factors that may cause connections between them. Moreover, graphs change dynamically in long-term predictions, but current methods do not account for future graph changes. To address these challenges, we propose a long-term time-series forecasting framework called Multi-factor Separation Evolutionary Spatial–Temporal Graph Neural Networks (MSE-STGNN). Our framework considers edge diversity, graph changes and spatial–temporal architecture in long-term prediction processes and proposes three modules. Specifically, we propose a Multi-factor Separation (MS) module to separate the factors influencing node connectivity, enabling the acquisition of a graph more closely aligned with actual circumstances; then we propose a Graph Prediction (GP) module to incorporate future graphs to correct errors in the graph on which multi-step predictions depend. Moreover, we propose an Attention-enhanced Spatial–temporal dilated causal convolution module (AS-Conv) to more effectively leverage information pertaining to spatial and historical events. Our experimental results on datasets comprising of temperature and IT power data collected from real-world data centers show that the proposed method outperforms other advanced prediction methods in terms of prediction accuracy, and the learned latent graphs are explainable.