The invention discloses a coal-fired boiler exhaust gas temperature prediction method and system based on a LightGBM and a random search method, and solves the problems that an existing neural network model is liable to fall into a local minimum value and is liable to over-fit, and a support vector machine model is not suitable for large sample learning. The method comprises the steps of collecting historical operation data, performing data cleaning and normalization, performing feature selection according to mutual information entropy, constructing a model by adopting a LightGBM algorithm, optimizing hyper-parameters by adopting a random search algorithm, and obtaining an optimal model for verification application. According to the method, the LightGBM and the random search algorithm are adopted to establish and optimize the prediction model, the overfitting phenomenon is effectively prevented, the model generalization ability is excellent, a large sample learning strategy is supported, training is more efficient, the calculation speed is higher, lower model deviation can be achieved, meanwhile, the random search algorithm is combined, an optimal hyper-parameter combination is found, and the prediction accuracy is improved. The precision of the model is further improved, and a high-performance coal-fired boiler exhaust gas temperature prediction model is obtained.