In this study, a novel method for retrieving atmospheric temperature profiles with tree-structured Parzen estimator (TPE) and multilayer perceptron (MLP) algorithms was proposed, using FY-4A/GIIRS (Geosynchronous Interferometric Infrared Sounder) and ERA5 data. Firstly, by adding solar altitude angle, satellite zenith angle, 2m temperature, and surface temperature to the input layer of MLP, there is an improvement in retrieval accuracy. Secondly, TPE is effective in optimizing the hyper-parameters of MLP, and a set of optimized hyper-parameters is obtained through iterative optimization. Thirdly, comparing the retrieved temperature profiles with ERA5 data, we found that retrieval accuracy is influenced by detector, signal-to-noise ratio, terrain, solar altitude angle, satellite zenith angle, and the horizontal temperature gradient. The mean biases of the two adjacent detectors show significant differences, and the retrieval accuracy of the center detectors is greater than that of the north and south sides. The retrieval accuracy is relatively poor in areas with high terrain and large satellite zenith angle. There is a monthly variation in the retrieval accuracy due to the horizontal temperature gradient and signal-to-noise ratio and a significant diurnal variation due to solar altitude angle and signal-to-noise ratio. Compared to in situ sounding data, the mean biases vary from −0.56 K to 0.60 K, and the standard deviations vary from 1.26 K to 2.17 K. The analysis of factors influencing retrieval accuracy provides important insights into improving the ability to retrieve atmospheric temperatures from geostationary hyperspectral IR sounder observations for near real-time (NRT) applications.