In this study, a new method for treating the wall boundary in smoothed particle hydrodynamics (SPH) is proposed to simulate free surface flows effectively. Unlike conventional methods of wall boundary treatment through boundary particles, in the proposed method, the wall boundary condition is directly imposed by adding boundary truncation terms to the mass and momentum conservation equations. Thus, boundary particles are not used in boundary modeling. Doing so, the wall boundary condition is accurately imposed, boundary modeling is simplified, and computation is made efficient without losing stability in SPH. Performance of the proposed method is demonstrated through several numerical examples: dam break, dam break with a wedge, sloshing, inclined bed, cross-lever rotation, pulsating tank and sloshing with a flexible baffle. These results are compared with available experimental results, analytical solutions, and results obtained using the boundary particle method.