Remaining Useful Life (RUL) prediction is a necessary tool for condition monitoring and health management of rotating machinery, which is very important to ensure safe and economical operation of rotating machinery. Since traditional prediction methods are slightly insufficient in extracting local spatio-temporal feature information, this study introduces a method of predicting the remaining life of bearings by using the Graph Convolutional Network (GCN). Firstly, the amplitude of signal samples is used as features to construct nodes. Secondly, edge features are generated based on the temporal correlation between the front and back nodes to capture the local temporal feature information in the sample signals. Based on the constructed nodes and edges, the PathGraph is generated. Meanwhile, a graph neural network prediction framework is built to mine and learn the temporal feature information in the graph structure to achieve end-to-end bearing lifetime prediction. Experimental results of this study verify the effectiveness of the proposed method in predicting the remaining useful life of bearings.