An emerging phase of matter among the class of topological materials is nodal line semimetal, possessing symmetry-protected one-dimensional gapless lines at the (or close to) the Fermi level in $k$-space. When the $k$-dispersion of the nodal line is weak, van Hove singularities generated by the almost flat nodal lines may be prone to instabilities introduced by additional perturbations such as spin-orbit coupling or magnetism. Here, we study Cr-based ferromagnetic chalcospinel compound CuCr$_2$Se$_4$ (CCS) via first-principles electronic structure methods and reveal the true origin of its dissipationless anomalous Hall conductivity, which was not well understood previously. We find that CCS hosts nodal lines protected by nonsymmorphic symmetries, located in the vicinity of Fermi level, and that such nodal lines are the origin of the previously observed distinct behavior of the anomalous Hall signature in the presence of electron doping. The splitting of nodal line via spin-orbit coupling produces a large Berry curvature, which leads to a significant response in anomalous Hall conductivity. Upon electron doping via chemical substitution or gating, or rotation of magnetization via external magnetic field, steep change of anomalous Hall behavior occurs, which makes CCS a promising compound for low energy spintronics applications.