As the cheapest and one of the most abundant transition metals, Fe is not only involved in nitrogenases for biological N2 fixation but is also extensively utilized in the Haber-Bosch process for industrial-scale NH3 synthesis. However, the application of Fe-based electrocatalysts for ambient N2-to-NH3 conversion still requires exploration of effective strategies to boost the catalytic performances for simultaneously achieving a large NH3 yield and a high Faradaic efficiency (FE). Here, we report that the ambient electrocatalytic N2 reduction activity of a β-FeOOH nanorod can be greatly improved by fluorine doping. When tested at -0.60 V vs. reversible hydrogen electrode (RHE) in 0.5 M LiClO4, such a β-FeO(OH,F) nanorod obtains an optimal NH3 yield (42.38 μg h-1 mgcat.-1) and FE (9.02%), much higher than those of pristine β-FeOOH (10.01 μg h-1 mgcat.-1, 2.16%). Density functional theory calculations reveal that the enhancement in activity originates from the lower reaction energy barrier (0.24 eV) of the nanorod than that of β-FeOOH (0.59 eV).