Surface waves in seismic data are often dominant in a land or shallow-water environment. Separating them from primaries is of great importance either for removing them as noise for reservoir imaging and characterization or for extracting them as signal for near-surface characterization. However, their complex properties make the surface-wave separation significantly challenging in seismic processing. To address the challenges, we propose a method of three-dimensional surface-wave estimation and separation using an iterative closed-loop approach. The closed loop contains a relatively simple forward model of surface waves and adaptive subtraction of the forward-modelled surface waves from the observed surface waves, making it possible to evaluate the residual between them. In this approach, the surface-wave model is parameterized by the frequency-dependent slowness and source properties for each surface-wave mode. The optimal parameters are estimated in such a way that the residual is minimized and, consequently, this approach solves the inverse problem. Through real data examples, we demonstrate that the proposed method successfully estimates the surface waves and separates them out from the seismic data. In addition, it is demonstrated that our method can also be applied to undersampled, irregularly sampled, and blended seismic data.