Concept:
Nitrogen fixation is one of the most energetically expensive biological processes in nature because of the extreme stability of the $N_2$ triple bond.
Step 1: Energetic Requirements of Nitrogenase.
The reduction of one molecule of $N_2$ requires 8 electrons and 8 protons. To drive the transfer of each electron from the Fe-protein to the MoFe-protein of the nitrogenase complex, 2 ATP molecules are hydrolyzed.
Step 2: The Calculation.
Since 8 electrons are required to reduce one $N_2$ into two molecules of $NH_3$ (and one $H_2$ molecule as an obligatory byproduct), the total ATP cost is:
\[ 8 \text{ electrons} \times 2 \text{ ATP/electron} = 16 \text{ ATP} \]
Step 3: Conclusion.
Therefore, 16 ATP molecules are required to produce two molecules of ammonia.