As a new retrieval method, the Optimal Estimation Method (OEM) is playing an increasingly important role in detecting the atmospheric environment by lidar. To characterize the reliability of the atmospheric temperature inversion results by lidar, the OEM uncertainty formula was derived and the sources of uncertainty was clarified. Based on the simulated echo photon profiles of the Rayleigh lidar, the middle atmospheric temperature and the corresponding uncertainty was calculated, which demonstrated that the main uncertainty sources in the OEM inversion process are the reference pressure uncertainty and noise uncertainty. Using the Monte Carlo method (MCM), the OEM uncertainty verification framework was established and the uncertainty values generated by different sources of uncertainty were verified. Results show that the uncertainty calculated by two different methods are consistent below the altitude of 85 km, proving the accuracy of the OEM uncertainty theories. In addition, temperature retrieval based on measured results by Rayleigh lidar was performed and the uncertainty analysis was accomplished, which paves the way for the applications of lidar in monitoring the atmospheric environment.