This paper presents a numerical model to simulate the evolution of waves and their interactions with a restrained ship that is moored in coastal waters. The model aims to be applicable at the scale of a harbour or coastal region, while accounting for the key physical processes that determine the hydrodynamic loads on the ship. Its methodology is based on the non-hydrostatic wave-flow model SWASH, which provides an efficient tool to simulate the nonlinear dynamics that govern the nearshore wave field. In this work, we propose a new numerical algorithm that accounts for the presence of a non-moving floating body, to resolve the wave impact on a restrained ship. The model is validated through comparisons with an analytic solution, a numerical solution, and two laboratory campaigns. The results of the model-data comparison demonstrate that the model captures the scattering of waves by a restrained body. Furthermore, it gives a reasonable prediction of the hydrodynamic loads that act on a restrained container ship for a range of wave conditions. Importantly, the model captures these dynamics efficiently, which demonstrates that it retains this favourable property of the non-hydrostatic approach when a floating body is included. The findings of this study suggest that the model provides a promising new alternative to simulate the nonlinear evolution of waves and their impact on a restrained ship at the scale of a realistic harbour or coastal region.