Quantifying the vertical distribution of atmospheric aerosols is crucial for estimating their impact on the Earth's energy budget and climate, improving forecast of air pollution in cities, and reducing biases in the retrieval of greenhouse gases (GHGs) from space. However, to date, passive remote sensing measurements have provided limited information about aerosol extinction profiles. In this study, we propose the use of a spectral sorting approach to constrain the aerosol vertical structure using spectra of reflected sunlight absorption within the molecular oxygen (O₂) A-band collected by the Orbiting Carbon Observatory-2 (OCO-2). The effectiveness of the approach is evaluated using spectra acquired over the western Sahara coast by comparing the aerosol profile retrievals with lidar measurements from the Cloud-Aerosol Lidar and Infrared Pathfinder Satellite Observation (CALIPSO) Cloud-Aerosol Lidar with Orthogonal Polarization (CALIOP). Using a radiative transfer model to simulate OCO-2 measurements, we found that high-resolution O₂ A-band measurements have high sensitivity to aerosol optical depth (AOD) and aerosol layer height (ALH). Retrieved estimates of AOD and ALH based on a look up table technique show good agreement with CALIPSO measurements, with correlation coefficients of 0.65 and 0.53, respectively. The strength of the proposed spectral sorting technique lies in its ability to identify spectral channels with high sensitivity to AOD and ALH and extract the associated information from the observed radiance in a straightforward manner. The proposed approach has the potential to enable future passive remote sensing missions to map the aerosol vertical distribution on a global scale