We consider generic derivative corrections to the Einstein gravity and find new classes of theories without ghost around the Minkowski background by means of an extension of the spacetime geometry. We assume the Riemann-Cartan geometry, i.e., a geometry with a nonvanishing torsion, and consider all possible terms in the Lagrangian up to scaling dimension four. We first clarify the number, spins, and parities of all particle species around the Minkowski background and find that some of those particle species are ghosts for generic choices of parameters. For special choices of the parameters, on the other hand, those would-be ghosts become infinitely heavy and thus can be removed from the physical content of particle species. Imposing the conditions on the coupling constants to eliminate the ghosts, we find new quadratic curvature theories which are ghostfree around the Minkowski background for a range of parameters. A key feature of these theories is that there exist a nonghost massive spin-2 particle and a nonghost massive spin-0 particle in the graviton propagator, as well as the massless spin-2 graviton. In the limit of the infinite mass of the torsion, the Riemann-Cartan geometry reduces to the Riemannian geometry and thus the physical content of particle species coincides with that of the well-known quadratic curvature theory in the metric formalism, i.e., a massive spin-2 ghost, a massive spin-0 particle and the massless spin-2 graviton. Ghostfreedom therefore sets, besides other constraints, an upper bound on the mass of the torsion. In addition to the above mentioned particle species (a massive spin-2 particle, a massive spin-0 particle and the massless spin-2 graviton), the ghostfree theory contains either the set of a massive spin-1 and a massive spin-0 (Class I) or a couple of spin-1 (Class II). These additional particle species mediate gravity sourced by the spin of matter fields.