Mangrove ecosystems are highly productive and provide important ecosystem services. However, in the Red Sea mangroves are under severe nutrient-limiting conditions, reflected in dwarf plants. The nutrient limitation is especially acute for iron, as verified experimentally, although the low carbon-to-nutrient stoichiometric ratios reported for Red Sea mangrove leaves are indicative of general nutrient depletion. Therefore, atmospheric nitrogen (N2) fixation in mangrove sediments might be particularly important considering the minimal nitrogen inputs from land. Here, we tested the effect of temperature and crab density on sediment N2 fixation rates in mature and juvenile mangrove (Avicennia marina) stands in the central Red Sea. The average N2 fixation rates (from 0.002 ± 0.002 to 0.46 ± 0.12 mg N m−2 d−1) fall in the low range of N2 fixation rates reported in mangroves elsewhere, which is in agreement with the small size of the mangrove plants. Mature mangrove sediments hold higher N2 fixation rates than the juvenile mangrove sediment, related to a higher sediment organic matter and carbon content. We found a detrimental effect of temperature and crab density on sediment N2 fixation rates. Maximum N2 fixation rates were detected at 28 °C with a sharp decrease at 35 °C. Similarly, high crab-density reduced N2 fixation, likely due to the sediment oxygenation or the grazing of cyanobacteria by crabs. This is supported by i) previously reported higher oxygen concentration and redox around burrows compared to undisturbed sediment and ii) lighter sediment carbon isotopic composition in high crab-density than in low crab-density sediments, indicating a higher contribution of microphytobenthos in the mature sediments supporting low crab-density. Our data document temperature and crab density as factors affecting N2 fixation in the Red Sea mangrove sediments.