A nonlocal operator method is proposed which is generally applicable for solving partial differential equations (PDEs) of mechanical problems. The nonlocal operator can be regarded as the integral form “equivalent” to the differential form in the sense of a nonlocal interaction model for solving the unknown field. The variation of a nonlocal operator plays an equivalent role as the derivatives of the shape functions in the meshless methods or those of the finite element method, thus it circumvents many difficulties in the calculation of shape functions and their derivatives. The nonlocal operator method can consistently applied with common procedure leading to the weak forms, i.e. the variational principle and the weighted residual method. Based on these, the residual and the tangent stiffness matrix can be obtained with ease. The nonlocal operator method is enhanced here also with an operator energy functional to satisfy the linear consistency of the field. Higher order nonlocal operators and higher order operator energy functional are hereby generalized. A highlighted of the present method is the functional derived based on the nonlocal operator can convert the construction of residual and stiffness matrix into a series of matrix multiplications using the predefined nonlocal operators. The nonlocal strong forms of different functionals can be obtained easily via the concept of support and dual-support, the two basic elements introduced in the paper. Several numerical examples of different types of PDEs are presented in the end to show the effectiveness of the present method and also serve for validation.