This paper details a DSM (digital surface model) generation method using ZY-3 images based on object semi-global optimization. This method avoids the limitations imposed when building a match cost cube in the standard method. The proposed method combines semi-global optimization and an image pyramid to dynamically determine the search space of every pixel in the next pyramid layer according to the match result of the previous layer. Combining outlier detection technology and using mutual information and CENSUS as cost function, it realizes high-precision DSM generation from ZY3 images. We analyzed the key factors affecting DSM accuracy through experiments.