Simultaneously obtaining the vertical distribution and profile of aerosol and water vapor is crucial for in-depth understanding of the Earth's radiation balance, regional water cycle, and the causes of frequent haze weather in China. This study developed a system and inversion method based on multi-axis differential optical absorption spectroscopy (MAX-DOAS) to simultaneously retrieve tropospheric aerosol and water vapor profiles. The absorption of dioxy (O4) was obtained by multi-elevation measurement using the developed ground-based MAX-DOAS system. By minimizing a cost function combining an atmospheric radiative transfer model, aerosol extinction profiles were first inverted, followed by water vapor profiles. Optimized parameter selection in the look-up table method reduced reliance on prior profile information, enhancing pollutant distribution retrieval accuracy. In the monitoring period in Huaibei region, aerosols were mainly below 1.5 km, while water vapor concentrations decreased with altitude. Comparisons of water vapor vertical column densities (VCDs) retrieved through the look-up table method with the European Centre for Medium-Range Weather Forecasts(ECMWF) ERA5 model and geometric approximation showed good agreement, with correlation coefficients of 0.93 and 0.98, respectively. To comprehend water vapor sources at various vertical layers, a 24-h backward trajectory clustering analysis was conducted using the HYSPLIT model based on observed wind fields. Findings revealed that at 500 m altitude, water vapor primarily emanated from the southeast, whereas at 1 km and 2 km altitudes, it predominantly originated from the southwest. The study advances simultaneous tropospheric aerosol and water vapor profile retrieval, providing reliable technical support for the investigation of regional pollution.