The invention discloses an automatic focusing method of an infrared imaging system. The automatic focusing method includes the steps of judging whether the focusing operation is needed or not, calculating the image stretching coefficient and selecting a focusing window if the focusing operation is needed, then obtaining infrared image data, conducting gray stretching on the infrared image data through the calculated image stretching coefficient, saving data after the gray stretching is carried out on the data in the focusing window in a focusing window matrix, using the focusing window matrix to calculate evaluation function values, judging whether the current focusing position is the best focusing position or not according to the evaluation function values, finishing the focusing process if the current focusing position is the best focusing position, otherwise adjusting a lens and executing the steps again. The automatic focusing method of the infrared imaging system gives considerations to characteristics of infrared imaging system imaging and automatic focusing, overcomes the shortcoming of the infrared image low signal-to-noise ratio, and is stable in focusing process and high in work efficiency.