In classical mechanics, the action and angle variables (J, θ) can be found by integrating the momentum p with respect to the coordinate q under the constraint of energy conservation. Because it is not known how to extend Riemann integration to operator functions and variables, the classical method of action-angle formalism cannot be extended to quantum mechanics. We show that by using general quantum canonical transformations, one can transform (p, q) into (J, θ), by which one of the conjugate variables in the Hamiltonian is eliminated. This algebraic integration by quantum canonical transformations gives not only the operator relations between (p, q) and (J, θ), but also the eigenfunctions of the Hamiltonian and the eigenfunctions of the phase operator. These results offer a new point of view for the action-angle formalism in quantum mechanics.