In this paper, an alternating direction method of multipliers with a worst-case convergence rate of $O(1/n^2)$ is presented, where $n$ is the iteration counter. In order to achieve the convergence rate, the authors adapt a rule proposed by Chambolle and Pock to update the penalty parameter every $k$ (constant) iterations. The assumptions on the convex minimization model are mild and satisfied in representative applications. The theoretical results are illustrated by numerical experiments.