Walnut hulls, buckwheat hulls, anthracite coal powder and coke powder were selected as reductants, respectively, and mixed with hematite for the preparation of carbon-containing pellets. The effects of reduction temperature and C/O molar ratio on the reduction efficiency of pellets were investigated. In particular, the reaction mechanism and the release pattern of NH3 and HCN in the complex reaction process of direct-reduction ironmaking were analyzed via XRD, XPS and TG-FTIR. The results showed that the optimum degree of reduction (90 %) could be obtained in conditions of dwelling time = 30 min, C/O molar ratio = 1.2 and roasting time = 1000 degrees C. It showed that the reduction process of iron ore powder followed the law of Fe2O3 -> Fe3O4 -> FeO -> Fe reduction step by step. The release of NH3 and HCN is inversely proportional to C/O, and the FexOy is the main factor inhibiting their release. In the mentioned optimal reaction conditions, the conversion rate of N to NH3 and HCN in the case of biomass as a reductant is reduced by 15-20 % compared with using conventional reductants (such as coal powder and coke powder). More N exists in the solid-phase products when biomass as a reductant. Besides, to further explore the effects of Fe and Fe2+ on the NOx precursors generation from the pyrolysis of biomass, it was shown by XPS that the existence of N in biomass is mainly in the form of amines (N-P), and the N endowment in coal and coke powders is mainly in the form of pyrroles (N-5). Subsequently, 2,5-diketopiperazine (DKP) was chosen as a model compound for quantum chemistry simulation. The results revealed that Fe and Fe2+ elevated the Mayer bond level of DKP, and improved the energy barrier for the NOx precursor generation. The inhibitory effect of Fe on the HCN was better than Fe2+, the inhibitory effect of Fe2+ on the NH3 was better than Fe. In brief, the raw biomass as reducing agent for direct reduction ironmaking basically achieved the synergistic effect on direct reduced iron (DRI) yield and NOx reduction.