To extract terraced fields in hilly areas on a large scale in an automated and high-precision manner, this paper proposes a terrace extraction method that combines the Digital Elevation Model (DEM), Sentinel-2 imagery, and the improved U-Net semantic segmentation model. The U-Net model is modified by introducing Attention Gate modules into its decoding modules to suppress the interference of redundant features and adding Dropout and Batch Normalization layers to improve training speed, robustness, and fitting ability. In addition, the DEM band is combined with the red, green, and blue bands of the remote sensing images to make full use of terrain information. The experimental results show that the Precision, Recall, F1 score, and Mean Intersection over Union of the proposed method for terrace extraction are improved to other mainstream advanced methods, and the internal information of the terraces extracted is more complete, with fewer false positive and false negative results.