This paper studied the consensus problem of the leader-following multiagent system. It is assumed that the state information of the leader is only available to a subset of followers, while the communication among agents occurs at sampling instant. To achieve leader-following consensus, a class of distributed impulsive control based on sampling information is proposed. By using the stability theory of impulsive systems, algebraic graph theory, and stochastic matrices theory, a necessary and sufficient condition for fixed topology and sufficient condition for switching topology are obtained to guarantee the leader-following consensus of the multiagent system. It is found that leader-following consensus is critically dependent on the sampling period, control gains, and interaction graph. Finally, two numerical examples are given to illustrate the effectiveness of the proposed approach and the correctness of theoretical analysis.