A theoretical model and a design of a magnetic-field tunable CdMnTeCdMgTe terahertz quantum well infrared photodetector are presented. The energy levels and the corresponding wave functions were computed from the envelope function Schrödinger equation using the effective-mass approximation and accounting for Landau quantization and the giant Zeeman effect induced by magnetic confinement. The electron dynamics were modeled within the self-consistent coupled rate equations approach, with all relevant electron-longitudinal-optical phonon and electron-longitudinal-acoustic phonon scatterings included. A perpendicular magnetic field varying between 0 and 5 T, at a temperature of 1.5 K, was found to enable a large shift of the detection energy, yielding a tuning range between 24.1 and 34.3 meV, equivalent to 51.4-36.1 μm wavelengths. For magnetic fields between 1 and 5 T, when the electron population of the quantum well infrared photodetector is spin polarized, a reasonably low dark current of ≤1.4× 10-2 A cm2 and a large responsivity of 0.36-0.64 AW are predicted.