Mangrove forests are among the most productive and diverse ecosystems on the planet, despite limited nitrogen (N) availability. Under such conditions, animal-microbe associations (holobionts) are often key to ecosystem functioning. Here, we investigated the role of fiddler crabs and their carapace-associated microbial biofilm as hotspots of microbial N transformations and sources of N within the mangrove ecosystem. 16S rRNA gene and metagenomic sequencing provided evidence of a microbial biofilm dominated by Cyanobacteria, Alphaproteobacteria, Actinobacteria, and Bacteroidota with a community encoding both aerobic and anaerobic pathways of the N cycle. Dinitrogen (N 2) fixation was among the most commonly predicted process. Net N fluxes between the biofilm-covered crabs and the water and microbial N transformation rates in suspended biofilm slurries portray these holobionts as a net N 2 sink, with N 2 fixation exceeding N losses, and as a significant source of ammonium and dissolved organic N to the surrounding environment. N stable isotope natural abundances of fiddler crab carapace-associated biofilms were within the range expected for fixed N, further suggesting active microbial N 2 fixation. These results extend our knowledge on the diversity of invertebrate-microbe associations, and provide a clear example of how animal microbiota can mediate a plethora of essential biogeochemical processes in mangrove ecosystems.