In this paper, a randomized parallel algorithm is proposed to solve the distributed optimal consensus problem of multi-agent systems. Involving both the transient response and the final consensus state, the problem is described as a constrained non-separable optimization problem. Inspired by the randomized Jacobi proximal alternating direction method of multipliers, the proposed algorithm makes it possible for only a fraction of agents to solve their private subproblems in parallel at each iteration, which greatly saves computational resources and enhances running efficiency. The convergence analysis of the algorithm gives fully distributed convergence conditions. A trade-off between the convergence speed and resource savings is then obtained, where the convergence rate is estimated to be at least O1t. Furthermore, the algorithm can be accelerated to enjoy a convergence rate of O1t2 by adaptively adjusting the auxiliary parameters properly. Numerical simulations demonstrate the effectiveness of the theoretical results.