Inspired by the Maxwell symmetry generalization of general relativity (Maxwell gravity), we have constructed the Maxwell extension of f (R) gravity. We found that the semi-simple extension of the Poincare symmetry allows us to introduce geometrically a cosmological constant term in four-dimensional f (R) gravity. This symmetry also allows the introduction of a non-vanishing torsion to the Maxwell f (R) theory. It is found that the antisymmetric gauge field B-ab associated with Maxwell extension is considered as a source of the torsion. It is also found that the gravitational equation of motion acquires a new term in the form of an energy-momentum tensor for the background field. The importance of these new equations is briefly discussed.