Hydraulic shaking table is mainly used to stimulate the desired vibration environment and evaluate the shock resistance of structure. However, due to the inherent nonlinearities of the hydraulic shaking table, the acceleration response displays amplitude attenuation and phase delay for sinusoidal excitation signal. The distorted response degrades the control performance and even leads to an increase in system instability. In this paper, the water cycle algorithm (WCA), a recently developed metaheuristic method, is developed to estimate the harmonic information such as amplitude and phase. The basic idea of the proposed algorithm is inspired from nature and based on the observation of water cycle process and how rivers and streams flow to the sea in the nature world. The estimation process based on WCA is sequentially updating the weight vector of the signal. The amplitude and phase of fundamental as well as each harmonic can be achieved when the objective function is minimized. Simulation and experimental results demonstrate that the proposed harmonic estimation algorithm has good real-time performance, fast convergence, and excellent accuracy.