The finite integration method is proposed in this paper to approximate solutions of partial differential equations. The coefficient matrix of this finite integration method is derived and its superior accuracy and efficiency is demonstrated by making comparison with the classical finite difference method. For illustration, the finite integration method is applied to solve a nonlocal elastic straight bar under different loading conditions both for static and dynamic cases in which Laplace transform technique is adopted for the dynamic problems. Several illustrative examples indicate that high accurate numerical solutions are obtained with no extra computational efforts. The method is readily extendable to solve more complicated problems of nonlocal elasticity.