We perform a phase space analysis of a nonminimally coupled modified gravity theory with the Lagrangian density of the form 1 2 f1(R) + [1+ λf2(R)]Lm, where f1(R) and f2(R) are arbitrary functions of the curvature scalar R and Lm is the matter Lagrangian density. We apply the dynamical system approach to this scenario in two particular models. In the first model we assume f1(R) = 2R with a general form for f2(R) and set favorable values for effective equation of state parameter which is related to the several epochs of the cosmic evolution and study the critical points and their stability in each cosmic eras. In the second case, we allow the f1(R) to be an arbitrary function of R and set f2(R) = 2R. We find the late-time attractor solution for the model and show that this model has a late-time accelerating epoch and an acceptable matter era.