Ship maneuvering performance in waves has attracted much attention in recent years. One of main research efforts for this problem has been devoted to the high-accuracy computation of hydrodynamic forces and moments, as well as wave-induced motions, for ships performing maneuvering motions in waves. The objective of this article is to present a numerical study on the computation of the mean forces and moments, and wave-induced six degrees of freedom motions for a ship moving obliquely in regular head and beam waves. The RANS (Reynolds-Averaged Navier-Stokes) solver based on OpenFOAM is used for this purpose. The RANS computations herein are carried out in a horizontal coordinate system. The numerical wave maker with prescribing values of flow variables on the domain boundaries is applied for the wave generation in the computational domain. However, in order to prevent wave reflection, relaxed zones adjacent to the wave maker boundaries are set up. A new program module is inserted into OpenFOAM to update the flow velocity and wave evaluation on the wave-maker boundaries and in the relaxed zones during the RANS computation. The mesh deformation method is employed to allow the ship to perform motions in space. However, a virtual spring system is attached to the ship so as to restrain the surge, sway and yaw, while heave, pitch and roll are completely free, so that the ship is able to oscillate periodically around a certain position in space. The computed mean forces and moments with the inertia effects agree fairly well with the experimental data, and the computed wave-induced motions are also in quite reasonable agreement with the experimental data. This study shows a very successful computation, as well as the procedure of the RANS results processing.