In this paper, we consider the fermionic Casimir effect under a new type of space-time topology using the concept of quotient topology. The relation between the new topology and that in Ref. \cite{Feng,Zhai3} is something like that between a M\"obius strip and a cylindric. We obtain the exact results of the Casimir energy and force for the massless and massive Dirac fields in the ($D+1$)-dimensional space-time. For both massless and massive cases, there is a $Z_2$ symmetry for the Casimir energy. To see the effect of the mass, we compare the result with that of the massless one and we found that the Casimir force approaches the result of the force in the massless case when the mass tends to zero and vanishes when the mass tends to infinity.