The boundary truncation of the kernel function affects the numerical accuracy and calculation stability of the smooth particle hydrodynamics (SPH) method and has been one of the key research fields for this method. In this paper, an efficient and stable boundary processing method for the SPH method was introduced by adopting an improved boundary interpolation method (i.e., the improved Shepard method) which needs only the sum of direct accumulation for fixed-boundary particles to improve the numerical stability and computational efficiency of the fixed ghost particle method. The improvement effect of the method was demonstrated by comparing it with different interpolation methods using the cases of still water, a wave generated by dam-breaking, and a solitary wave attacking problem with fixed walls and a moveable wall. The results showed that the new boundary processing method for SPH can help remarkably improve the efficiency of calculation and reduce the oscillations of pressure when simulating various flows.