The contact force fluctuation of the pantograph-catenary system greatly affects the current quality when the train is running at high speed. To address this issue, an active control method of pantograph is proposed, which is based on contact force prediction of long short-term memory network. The advantage of long short-term memory network for time series prediction is fully utilized. Firstly, the pantograph model with two lumped masses is taken as the research object. Its dynamic equation is established, and the contact force fluctuation data is obtained by simulation of the model. Then, the contact force data obtained from simulation are utilized to train the long short-term memory network. In this way, a prediction model is formulated to predict the contact force at the next moment. Finally, the difference between the predicted value and the expected value of the contact force is taken as the target control force output to the magnetorheological damper. The magnetorheological damper provides the control force to act on the pantograph. The dynamic fluctuation of the contact force is suppressed and the current quality of the train is improved. Experimental results show that the proposed method is more accurate in the control of the contact force. The standard deviation of the fluctuation of the contact force is significantly reduced by more than 70. 13% . The offline situation of the pantograph-catenary system is avoided, which verifies the stability and superiority of the proposed method for improving the current quality of the pantograph.