Non-Riemannian generalization of the standard Born–Infeld (BI) Lagrangian is introduced and analyzed from a theory of gravitation with dynamical torsion field. The field equations derived from the proposed action lead to a trace free gravitational equation (non-Riemannian analog to the trace free equation (TFE) from Finkelstein et al., 2001; Ellis et al., 2011; Ellis, 2014) and the field equations for the torsion respectively. In this theoretical context, the fundamental constants arise all from the same geometry through geometrical invariant quantities (as from the curvature R). New results involving generation of primordial magnetic fields and the link with leptogenesis and baryogenesis are presented and possible explanations given. The physically admissible matter fields can be introduced in the model via the torsion vector hμ. Such fields include some dark matter candidates such as axion, right neutrinos and Majorana and moreover, physical observables as vorticity can be included in the same way. From a new wormhole solution in a cosmological spacetime with torsion we also show that the primordial cosmic magnetic fields can originate from hμ with the axion field (that is contained in hμ) the responsible to control the dynamics and stability of the cosmic magnetic field but not the magnetogenesis itself. As we pointed out before (Cirilo-Lombardo, 2017), the analysis of Grand Unified Theories (GUT) in the context of this model indicates that the group manifold candidates are based in SO(10), SU(5) or some exceptional groups as E(6), E(7), etc.