Lithological mapping in highly vegetated areas using remote sensing techniques poses a significant challenge. Inspired by the concept of “geobotany”, we attempted to distinguish lithologies indirectly using machine learning algorithms (MLAs) based on Sentinel-2 and SRTM DEM in Zhangzhou City, Fujian Province. The study area has high vegetation cover, with lithologies that are largely obscured. After preprocessing such as cloud masking, resampling, and median image synthesis, 17 spectral bands and features from Sentinel-2 and 9 terrain features from DEM were extracted. Five widely used MLAs, MD, CART, SVM, RF, and GBDT, were trained and validated for lithological mapping. The results indicate that advanced MLAs, such as GBDT and RF, are highly effective for nonlinear modeling and learning with relative increases reaching 8.18%∼11.82% for GBDT and 6.36%∼10% for RF. Compared with optical imagery or terrain data alone, combining Sentinel-2 and DEM significantly improves the accuracy of lithological mapping, as it provides more comprehensive and precise spectral characteristics and spatial information. GBDT_Sen+DEM utilizing integrated data achieved the highest classification accuracy, with an overall accuracy of 63.18%. This study provides a case study for lithological mapping of areas with high vegetation cover at the local level. This also reinforces the idea that merging remote sensing and terrain data significantly enhances the precision and reliability of the lithological mapping methods.