Nitrogen (N2) fixation by heterotrophic bacteria associated with sinking particles contributes to marine N cycling, but a mechanistic understanding of its regulation and significance are not available. We develop a mathematical model for unicellular heterotrophic bacteria growing on sinking marine particles and can fix N2 under suitable environmental conditions. We find that the interactive effects of polysaccharide and polypeptide concentrations, sinking speed of particles, and surrounding O2 and concentrations determine the N2 fixation rate inside particles. N2 fixation inside sinking particles is mainly fueled by respiration rather than respiration. Our model suggests that anaerobic processes, including heterotrophic N2 fixation, can take place in anoxic microenvironments inside sinking particles even in fully oxygenated marine waters. The modelled rates are similar to bulk rates measured in the aphotic ocean, and our study consequently suggests that particle-associated heterotrophic N2 fixation contributes significantly to oceanic N2 fixation.