An oscillating mud motor having a valve section and a piston section positioned within a hollow cylindrical housing wherein the valve section comprises a timing cycle valve and a spool valve which hydraulically controls rotational movement of a piston on a central shaft in the piston section for linear reciprocation within the housing.