Dinitrogen (N2) fixation provides nitrogen sources supporting active chemoautotrophic processes in submarine hydrothermal systems. Here, the diazotrophic phylogenetic diversity and N2 fixation profile were investigated in depth along a sharp biogeochemical gradient from the hydrothermal vents to ambient seawater in a shallow submarine hydrothermal system (SHS) off Kueishantao Islet, Taiwan. Diazotrophic community compositions in the SHS covered all four known nifH clusters (I, II, III, and IV) and contained both characteristics of diazotrophic communities in deep-sea hydrothermal systems and terrestrial geothermal systems. The seawater around the vents was primarily dominated by nifH phylotypes affiliated with chemolithotrophic sulfur-oxidizing and iron-reducing bacteria. In contrast, in the seawater directly above the hydrothermal vents, the nifH community markedly contained diverse heterotrophic bacteria. The analysis, which focused on amino acid composition, protein spatial structure, and the possible co-occurrence of alternative nitrogenases in the presence of molybdenum-nitrogenase, further revealed that diazotrophic nitrogenase found around the hydrothermal vents exhibits potential molecular adaptations to high temperature, low pH, and sulfur-rich conditions. The relatively low N2 fixation rates (NFRs) were observed around the vents, where high concentrations of inorganic nitrogen compounds were present. However, notably, high NFRs were detected in seawater directly above the hydrothermal vents, which were 2–5 times higher than those at the reference site. The abundant iron, along with the depletion of nitrogen nutrients potentially resulting from nitrogen assimilation and loss processes, may have led to a high iron:nitrogen ratio, inducing the observed high NFRs. The co-occurrence of diverse nifH-containing heterotrophic bacteria and high NFRs suggests that these heterotrophs may play a major role in N2 fixation in this environment. This study suggests that the SHSs may be potential hotspots for marine N2 fixation, contributing significantly to the global ocean's N2 fixation budget and warranting further investigation.