: Sex expression is a complex process, and in-depth knowledge of its mechanism in pumpkin is important. In this study, young shoot apices at the one-true-leaf stage and 10-leaf stage in Cucurbita maxima trimonoecious line ‘2013–12’ and subandroecious line ‘9–6’ were collected as materials, and transcriptome sequencing was performed using an Illumina HiSeqTM 2000 System. 496 up-regulated genes and 375 down-regulated genes were identified between shoot apices containing mostly male flower buds and only female flower buds. Based on gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analysis, the differentially expressed genes were mainly enriched in the ethylene and auxin synthesis and signal transduction pathways. In addition, shoot apices at the 4-leaf stage were treated with the ethylene-releasing agent 2-chloroethylphosphonic acid (Ethrel), aminoethoxyvinyl glycine (AVG), AgNO3 and indoleacetic acid (IAA). The number of female flowers up to node 20 on the main stem of ‘2013–12’ increased significantly after Ethrel and IAA treatment and decreased significantly after AVG and AgNO3 treatment. The female flowers in ‘9–6’ showed slight changes after treatment with the exogenous chemicals. The expression of key genes in ethylene synthesis and signal transduction (CmaACS7, CmaACO1, CmaETR1 and CmaEIN3) was determined using quantitative RT-PCR, and the expression of these four genes was positively correlated with the number of female flowers in ‘2013–12’. The variations in gene expression, especially that of CmaACS7, after chemical treatment were small in ‘9–6’. From stage 1 (S1) to stage 7 (S7) of flower development, the expression of CmaACS7 in the stamen was much lower than that in the ovary, stigma and style. These transcriptome data and chemical treatment results indicated that IAA might affect pumpkin sex expression by inducing CmaACS7 expression and indirectly affecting ethylene production, and the ethylene synthesis and signal transduction pathways play crucial roles in pumpkin flower sex expression. A possible reason for the differences in sex expression between pumpkin lines ‘2013–12’ and ‘9–6’ was proposed based on the key gene expression. Overall, these transcriptome data and chemical treatment results suggest important roles for ethylene in pumpkin sex expression.