We present an algorithm for evaluating analytic nuclear energy gradients of the state-averaged density matrix renormalization group complete-active-space self-consistent field (SA-DMRG-CASSCF) theory based on the newly derived coupled-perturbed (CP) DMRG-CASSCF equations. The Lagrangian for the conventional SA-CASSCF analytic gradient theory is extended to the SA-DMRG-CASSCF variant that can fully consider a whole set of constraints on the parameters of multi-root canonical matrix product states formed at all the DMRG block configurations. An efficient algorithm to solve the CP-DMRG-CASSCF equations for determining the multipliers was developed. The complexity of the resultant analytic gradient algorithm is overall the same as that of the unperturbed SA-DMRG-CASSCF algorithm. In addition, a reduced-scaling approach was developed to directly compute the SA reduced density matrices (SA-RDMs) and their perturbed ones without calculating separate state-specific RDMs. As part of our implementation scheme, we neglect the term associated with the constraint on the active orbitals in terms of the active-active rotation in the Lagrangian. Thus, errors from the true analytic gradients may be caused in this scheme. The proposed gradient algorithm was tested with the spin-adapted implementation by checking how accurately the computed analytic energy gradients reproduce numerical gradients of the SA-DMRG-CASSCF energies using a common number of renormalized bases. The illustrative applications show that the errors are sufficiently small when using a typical number of the renormalized bases, which is required to attain adequate accuracy in DMRG's total energies.