Heading date is crucial for rice reproduction and the geographical expansion of cultivation. We fine-mapped qHD5 and identified LOC_Os05g03040 , a gene that encodes an AP2 transcription factor, as the candidate gene of qHD5 in our previous study. In this article, using two near-isogenic lines NIL(BG1) and NIL(XLJ), which were derived from the progeny of the cross between BigGrain1 (BG1) and Xiaolijing (XLJ), we verified that LOC_Os05g03040 represses heading date in rice through genetic complementation and CRISPR/Cas9 gene-editing experiments. Complementary results showed that qHD5 is a semi-dominant gene and that the qHD5 XLJ and qHD5 BG1 alleles are both functional. The homozygous mutant line generated from knocking out qHD5 XLJ in NIL(XLJ) headed earlier than NIL(XLJ) under both short-day and long-day conditions. In addition, the homozygous mutant line of qHD5 BG1 in NIL(BG1) also headed slightly earlier than NIL(BG1). All of these results show that qHD5 represses the heading date in rice. Transient expression showed that the qHD5 protein localizes to the nucleus. Transactivation activity assays showed that the C-terminus is the critical site that affects self-activation in qHD5 XLJ. qRT-PCR analysis revealed that qHD5 represses flowering by down-regulating Ehd2. qHD5 may have been selected during indica rice domestication. • qHD5 is a semi-dominant gene that represses heading date in rice. • qHD5 XLJ and qHD5 BG1 alleles are both functional and the repression function of qHD5XLJ is stronger than that of the qHD5BG1 allele. • qHD5 represses heading by down-regulating Ehd2. [ABSTRACT FROM AUTHOR]