Reducing fertilizer pollution is an important direction for modern ecological agriculture. Commonly, excessive nitrogen is applied to pepper. Capsaicin is one of the most important economic qualities of spicy peppers, but the effect of nitrogen on capsaicin is still inconsistent. This study aims to elucidate the impact of nitrogen fertilizer on capsaicin accumulation and to provide guidance on fertilizer application on highly spicy chili peppers. The experiment was conducted with five nitrogen fertilizer concentrations: N1 (urea 750 kg ha−1), N2 (urea 562.5 kg ha−1), N3 (urea 375 kg ha−1), N4 (urea 187.5 kg ha−1), and N0 (no nitrogen fertilizer). Nitrogen treatment was applied to two varieties with different spiciness levels from the seedling stage. The fruits in different layers of pepper plants were sampled on the 20th, 35th, and 50th day after anthesis, and the fruits’ size, content of capsaicin, capsaicin precursors, capsaicin competitors, as well as capsaicin-related enzyme activities and gene expression level were analyzed. The results indicate that, when applying N2 and N3, both chili pepper varieties exhibited higher fruit length, diameter, weight, and yield values. There were increased contents of total phenol, flavonoids, and tannins in both fruit varieties with N2 application. Moreover, the placenta weights of the bottom, middle, and top layers of the fruits on the 35th day were improved by 40.14%, 26.80%, and 55.91% for ‘Honglong 23’ and 55.10%, 37.04%, and 75.56% for ‘Hongxi’ compared with N0. At the same time, under N2 treatment, the phenylalanine ammonia-lyase (PAL) enzyme activity of capsaicin synthase significantly increased. In contrast, the capsaicin-degrading enzyme activities of peroxidase (POD) and polyphenol oxidase (PPO) decreased notably. The expression levels of capsaicin-synthetic genes such as phenylalanine cleavage enzyme gene (PAL), acyltransferase gene (AT3), 4-Coumaroyl coenzyme A ligase gene (4CL), cinnamate 4-hydroxylase gene (C4H), caffeoyl coenzyme A-3-oxo-methyltransferase gene (COMT), paminotransferase gene (PAMT), and hydroxycinnamyltransferase gene (HCT) were up-regulated in N2 fruits, which led to a significant increase in capsaicin content compared with the other four nitrogen amounts. A further reduction in nitrogen application to N3 and N4 resulted in a decrease in the precursor substance’s total phenol content and PAL activity and an increase in the competitive substance’s flavonoid, lignin, POD, and PPO enzyme activities. At the same time, the expression levels of capsaicinoid synthetic genes were downregulated in the N3 and N4 treatments, leading to a low content of total capsaicinoids. The capsaicinoid content showed a trend of 35th day > 50th day > 20th day for both varieties. Additionally, the contents of total capsaicinoids, total phenols, flavonoids, and lignins, as well as PAL enzyme activity, and the expression levels of PAL, AT3, 4CL, C4H, COMT, PAMT, and HCT exhibited characteristics of bottom layers > middle layers > top layers. The activities of POD and PPO gradually increased from the bottom to the top layers. The N2 (562.5 kg ha−1) treatment resulted in increases in placenta mass, maximum capsaicinoid precursor substance of total phenol content, and synthase enzyme activity, as well as decreases in capsaicinoid competing substances and degradative enzyme activity, so there were more substances available for capsaicin synthesis. Combined with the higher fruit weight and capsaicinoid content in the N2 treatment, N2 was considered a suitable nitrogen fertilizer dosage for highly spicy chili pepper cultivation.