Hydraulic diffusivity is a fundamental parameter in studying groundwater flow. An analytical solution for groundwater flow within a finite-length one-dimensional aquifer has been introduced. This analytical solution simplifies the river water level (RWL) by a piecewise linear function, accurately describing the arbitrary variation pattern. An inversion method for hydraulic diffusivity has been provided based on the analytical solution. Then, the method was employed to estimate the hydraulic diffusivity of a limestone aquifer in the Xiluodu reservoir and was verified by the FEFLOW software. The parameter sensitivity increases with the RWL fast increasing and reaches its peak value when the RWL approaches the maximum value. Given the sensitivity analysis, great attention should be paid to the stage when RWL fluctuates drastically for estimating hydraulic diffusivity. The proposed method is flexible to conditions that lack observation data or RWL fluctuating drastically.