Due to the block of high-rise objects and the influence of the sun’s altitude and azimuth, shadows are inevitably formed in remote sensing images particularly in urban areas, which causes missing information in the shadow region. In this paper, we propose a new method for shadow detection and compensation through objected-based strategy. For shadow detection, the shadow was highlighted by an improved shadow index (ISI) combined color space with an NIR band, then ISI was reconstructed by the objects acquired from the mean-shift algorithm to weaken noise interference and improve integrity. Finally, threshold segmentation was applied to obtain the shadow mask. For shadow compensation, the objects from segmentation were treated as a minimum processing unit. The adjacent objects are likely to have the same ambient light intensity, based on which we put forward a shadow compensation method which always compensates shadow objects with their adjacent non-shadow objects. Furthermore, we presented a dynamic penumbra compensation method (DPCM) to define the penumbra scope and accurately remove the penumbra. Finally, the proposed methods were compared with the stated-of-art shadow indexes, shadow compensation method and penumbra compensation methods. The experiments show that the proposed method can accurately detect shadow from urban high-resolution remote sensing images with a complex background and can effectively compensate the information in the shadow region.