The rotation-inversion controversy for the photoisomerization mechanism of azobenzene has been addressed on the basis of the CASSCF calculations for the excited-state relaxed surface scan along the CNN bending (inversion), the CNNC torsion (rotation), and the concerted CNN bending (concerted inversion) reaction pathways. According to our calculated results, the inversion channel involves a substantial energy barrier and a large S0-S1 energy gap so that it is a highly unfavorable channel to be considered for an efficient electronic relaxation. The rotation channel is essentially barrierless with a conical intersection close to the midpoint of the pathway to reasonably account for the subpicoseond to picosecond relaxation times observed in recent ultrafast experiments. Along the concerted inversion reaction path, a sloped conical intersection (S0/S1 CI_inv) was found to have the geometry close to a linear CNNC configuration. When the photoexcitation occurs in the S2 state, the concerted inversion channel may be open and the S0/S1 CI_inv would become energetically accessible to produce more trans-S0 isomers. A new mechanism is proposed to rationalize the early experimental results for the following two cases: (1) the trans-to-cis photoisomerization quantum yields on S2 excitation are much lower than the yields on S1 excitation; (2) the yields from both the S2 and the S1 excitations become essentially equal when the rotation channel is blocked by chemical modification or in an inclusion complex.