Cooperation is essential to biological organizations and human society. In this paper, the conditions of dilemmas resolving by quantum strategies in the three games, Prisoners' Dilemma, Chicken Game and Stag Hunt, are presented. The rule for the evolution of cooperation in general quantum games, b/c > coth 2 γ, is put forward. The formation of the rule is similar to those of the five rules in the classical game theory summarized by Nowak. b/c is still the benefit-to-cost ratio of the altruistic act, while γ is a measure for the game's entanglement. The rule is the prerequisite for the realization of cooperation in quantum games.