In this work we present a general machine learning based scheme to optimize experimental control. The method utilizes the neural network to learn the relation between the control parameters and the control goal, with which the optimal control parameters can be obtained. The main challenge of this approach is that the labeled data obtained from experiments are not abundant. The central idea of our scheme is to use the active learning to overcome this difficulty. As a demonstration example, we apply our method to control evaporative cooling experiments in cold atoms. We have first tested our method with simulated data and then applied our method to real experiments. We demonstrate that our method can successfully reach the best performance within hundreds of experimental runs. Our method does not require knowledge of the experimental system as a prior and is universal for experimental control in different systems.