A maximum entropy method for analytic continuation is extended by introducing quantum relative entropy. This method is formulated in terms of matrix-valued functions and therefore invariant under arbitrary unitary transformation of input matrix. As a result, the continuation of off-diagonal elements becomes straightforward. Without introducing any further ambiguity, the Bayesian probabilistic interpretation is maintained just as in the conventional maximum entropy method. The applications of our generalized formalism to a model spectrum and a real material demonstrate its usefulness and superiority.