Waterlogging stress (WS) hinders kernel development and directly reduces peanut yield; however, the mechanism of kernel filling in response to WS remains unknown. The waterlogging‐sensitive variety Huayu 39 was subjected to WS for 3 days at 7 days after the gynophores touched the ground (DAG). We found that WS affected kernel filling at 14, 21, and 28 DAG. WS decreased the average filling rate and kernel dry weight, while transcriptome sequencing and widely targeted metabolomic analysis revealed that WS inhibited the gene expression in starch and sucrose metabolism, which reduced sucrose input and transformation ability. Additionally, genes related to ethylene and melatonin synthesis and the accumulation of tryptophan and methionine were upregulated in response to WS. WS upregulated the expression of the gene encoding tryptophan decarboxylase (AhTDC), and overexpression of AhTDC in Arabidopsis significantly reduced the seed length, width, and weight. Therefore, WS reduced the kernel‐filling rate, leading to a reduction in the 100‐kernel weight. This survey informs the development of measures that alleviate the negative impact of WS on peanut yield and quality and provides a basis for exploring high‐yield and high‐quality cultivation, molecular‐assisted breeding, and waterlogging prevention in peanut farming.