The generalized \(f(R)\) gravity with curvature–matter coupling in five-dimensional (5D) spacetime can be established by assuming a hypersurface-orthogonal space-like Killing vector field of 5D spacetime, and it can be reduced to the 4D formalism of FRW universe. This theory is quite general and can give the corresponding results for Einstein gravity, and \(f(R)\) gravity with both no-coupling and non-minimal coupling in 5D spacetime as special cases, that is, we would give some new results besides previous ones given by Huang et al. in Phys Rev D 81:064003, 2010. Furthermore, in order to get some insight into the effects of this theory on the 4D spacetime, by considering a specific type of models with \(f_{1}(R)=f_{2}(R)=\alpha R^{m}\) and \(B(L_{m})=L_{m}=-\rho \), we not only discuss the constraints on the model parameters \(m,n\), but also illustrate the evolutionary trajectories of the scale factor \(a(t)\), the deceleration parameter \(q(t)\), and the scalar field \(\epsilon (t),\phi (t)\) in the reduced 4D spacetime. The research results show that this type of \(f(R)\) gravity models given by us could explain the current accelerated expansion of our universe without introducing dark energy.