Waterlogging is a major stress that severely affects onion cultivation worldwide, and developing stress-tolerant varieties could be a valuable measure for overcoming its adverse effects. Gathering information regarding the molecular mechanisms and gene expression patterns of waterlogging-tolerant and sensitive genotypes is an effective method for improving stress tolerance in onions. To date, the waterlogging tolerance-governing molecular mechanism in onions is unknown. This study identified the differentially expressed genes (DEGs) through transcriptome analysis in leaf tissue of two onion genotypes (Acc. 1666; tolerant and W-344; sensitive) presenting contrasting responses to waterlogging stress. Differential gene expression analysis revealed that in Acc. 1666, 1629 and 3271 genes were upregulated and downregulated, respectively. In W-344, 2134 and 1909 genes were upregulated and downregulated, respectively, under waterlogging stress. The proteins coded by these DEGs regulate several key biological processes to overcome waterlogging stress such as phytohormone production, antioxidant enzymes, programmed cell death, and energy production. The clusters of orthologous group pathway analysis revealed that DEGs contributed to the post-translational modification, energy production, and carbohydrate metabolism-related pathways under waterlogging stress. The enzyme assay demonstrated higher activity of antioxidant enzymes in Acc. 1666 than in W-344. The differential expression of waterlogging tolerance related genes, such as those related to antioxidant enzymes, phytohormone biosynthesis, carbohydrate metabolism, and transcriptional factors, suggested that significant fine reprogramming of gene expression occurs in response to waterlogging stress in onion. A few genes such as ADH, PDC, PEP carboxylase, WRKY22, and Respiratory burst oxidase D were exclusively upregulated in Acc. 1666. The molecular information about DEGs identified in the present study would be valuable for improving stress tolerance and for developing waterlogging tolerant onion varieties.