This paper studies the group consensus problem in networks of multi-agent systems, in which the nonlinear dynamics of all agents are unknown and nonidentical. We assume that the unknown dynamics are linearly parameterized. Adaptive control method is adopted in the algorithm design. A novel algorithm is proposed for the multi-agent systems to reach group consensus via pinning control strategies, which only rely on the relative position information between neighboring agents. The stability and parameter convergence analysis are done based on Lyapunov theory, Barbalat's lemma, adaptive control theory and algebraic graph theory. Finally, a simulation example is given to validate our theoretical results.