Longitudinal optical field modulation is of critical importance in a wide range of applications, including optical imaging, spectroscopy, and optical manipulation. However, it remains a considerable challenge to realize a uniformly distributed light field with extended depth-of-focus. Here, a high-efficiency extended depth-of-focus metalens is proposed by adjoint-based topology-shape optimization approach, wherein the theoretical electric field intensity corresponding to a variable focal-length phase is utilized as the figure of merit. Using a dozen of metalens with random structure parameters as initial structures, the average focal depth of topology-shape optimized metalens is greatly improved up to 18.80 μm (about 29.7λ), which is 1.54 times higher than the diffraction-limited focal depth. Moreover, all the topology-shape optimized metalens exhibit high diffraction efficiency exceeding 0.7 over the whole focal depth range, which is approximately three times greater than that of the forward design. Our results offer a new insight into the design of extended depth-of-focus metalens and may find potential applications in imaging, holography, and optical fabrication.