In this paper, contraction theory is applied to design the trajectory tracking controller for a fully-actuated 6-degree-of-freedom (6-DOF) autonomous underwater vehicle (AUV). First, assuming that all system parameters are known, an ideal controller is given. Then, to deal with the parameter uncertainties, an adaptive controller is proposed. Combined with the adaptive law, the estimated values of the parameters converge to their real values without requiring the persistent excitation (PE) condition to be satisfied, that is, the parameter identification is realized. Exponential convergence of the system is analyzed in the framework of contraction theory. The concepts of partial contraction, virtual system and modular properties reduce the difficulty of system design and analysis. The numerical simulation results show the effectiveness of the proposed method.