In this paper, a weak Galerkin finite element method is proposed and analyzed for the second-order elliptic equation with mixed boundary conditions. Optimal order error estimates are established in both discrete H-1 norm and the standard L-2 norm for the corresponding WG approximations. The numerical experiments are presented to verify the efficiency of the method.