As one of the most popular applications of lidar systems, the atmospheric visibility is defined to be inversely proportional to the atmospheric extinction coefficient at 0.55 um. Since the laser at 1.5 um shows the highest maximum permissible exposure in the wavelength ranging from 0.3 um to 10 um, the eye-safe 1.5 um lidar can be deployed in urban areas. In such a case, the measured extinction coefficient at 1.5 um should be converted to that at 0.55 um for visibility retrieval. Although several models have been established since 1962, the accurate wavelength conversion remains a challenge. An adaptive inversion algorithm for 1.5 um visibility lidar is proposed and demonstrated by using the in situ Angstrom wavelength exponent, which is derived from either a sun photometer or an aerosol spectrometer. The impact of the particle size distribution of atmospheric aerosols and the Rayleigh backscattering of atmospheric molecules are taken into account. In comparison, the Angstrom wavelength exponent derived from the sun photometer is 7.7% higher than that derived from the aerosol spectrometer. Then, using 1.5 um visibility lidar, the visibility with a temporal resolution of 5 min is detected over 48 hours in Hefei (31.83 N, 117.25 E). The average visibility error between the new method and a visibility sensor (Vaisala, PWD52) is 5.2% with the R-square value of 0.96, while the relative error between another reference visibility lidar at 532 nm and the visibility sensor is 6.7% with the R-square value of 0.91. All results agree with each other well, demonstrating the accuracy and stability of the algorithm.