In this paper, we extend Chandrasekhar’s method of calculating rotating black holes into f(R) theory. We show that the solution with constant Ricci scalar always exists in a general f(R) gravity and derive the Kerr and Kerr-Ads metric by using the analytical mathematical method. Suppose that the spacetime is a 4-dimensional Riemannian manifold with a general stationary axisymmetric metric, we calculate Cartan’s equation of structure and derive the Einstein tensor. In order to reduce the solving difficulty, we fix the gauge freedom to transform the metric into a more symmetric form. We solve the field equations in the two cases of the Ricci scalar $$R=0$$
R
=
0
and $$R\ne 0$$
R
≠
0
. In the case of $$R=0$$
R
=
0
, the Ernst’s equations are derived. We give the elementary solution of Ernst’s equations and show the way to obtain more solutions including Kerr metric. In the case of $$R\ne 0$$
R
≠
0
, we reasonably assume that the solution to the equations consists of two parts: the first is Kerr part and the second is introduced by the Ricci scalar. Giving solution to the second part and combining the two parts, we obtain the Kerr-Ads metric. The calculations are carried out in a general f(R) theory. Furthermore, the whole solving process can be treated as a standard calculation procedure to obtain rotating black holes, which can be applied to other modified gravities.