Porous nitrogen (N)-doped carbons derived from earth-abundant precursors and exhibiting tunable properties hold promise as low-cost, high-performance electrode materials for energy storage and conversion applications. As metal-free electrocatalysts for the oxygen reduction reaction (ORR) at the cathode in hydrogen fuel cells, N-doped carbons have shown selectivity and performance rivaling that of Pt/C. Alternatively, other N-doped carbons have also demonstrated low overpotentials and high selectivity for the 2-electron pathway of the ORR for the production of hydrogen peroxide. The activity and selectivity of these doped carbons are thought to result from their N-content, N-motifs, and/or porosity. However, the extent to which each of these variables impacts electrocatalytic ORR performance and whether there is an interactive effect between N-content, porous structure, etc. remains unclear. Herein, by implementing a design of experiments approach, the synthesis-structure-function relationship for N-doped carbons prepared via molten salt templating was elucidated to reveal how synthetic handles tune material properties which, in turn, determine electrocatalytic performance. Specifically, the wt% of N precursor and the synthesis temperature were found to have the most significant effect on the N-content and N-motif composition of the resulting N-doped carbons. Regarding porosity, larger surface areas and micropore volumes were realized for the carbons prepared with a larger wt% of N precursor. It was found that surface areas upwards of 300 m2/g were required to see any substantial activity (e.g. half-wave potential greater than 0.7 V vs RHE, effective electron transfer number > 3.4). Only after a threshold surface area was achieved were effects from N-content and N-motifs notable on performance and selectivity.