In this article, the consensus problem of nonlinear multiagent systems with grouping via state-constraint impulsive protocols is investigated. Two types of cases with and without leader agent are studied by using two kinds of protocols. A judgement strategy is designed to decide to group in the nonlinear multiagent systems, and two kinds of state-constraint impulsive control protocols, which include partial state constraint and full state constraint, are proposed to make this system cut down the cost of communication and reduce irreversible damage to equipment. Then, based on the algebraic graph theory, the Lyapunov stability theory, and the matrix theory, some sufficient conditions are established to deal with the consensus problem in the nonlinear multiagent systems. The presented results can be used to solve the consensus problem in the nonlinear multiagent systems with grouping. Finally, some important simulations are presented to illustrate the feasibility of the theoretical results.