Rice yield and heading date are two distinct traits controlled by quantitative trait loci (QTLs). The dissection of molecular mechanisms underlying rice yield traits is important for developing high-yielding rice varieties. Here, we report the cloning and characterization of Ghd8, a major QTL with pleiotropic effects on grain yield, heading date, and plant height. Two sets of near isogenic line populations were developed for the cloning of Ghd8. Ghd8 was narrowed down to a 20-kb region containing two putative genes, of which one encodes the OsHAP3 subunit of a CCAAT-box binding protein (HAP complex); this gene was regarded as the Ghd8 candidate. A complementary test confirmed the identity and pleiotropic effects of the gene; interestingly, the genetic effect of Ghd8 was dependent on its genetic background. By regulating Ehd1, RFT1, and Hd3a, Ghd8 delayed flowering under long-day conditions, but promoted flowering under short-day conditions. Ghd8 up-regulated MOC1, a key gene controlling tillering and branching; this increased the number of tillers, primary and secondary branches, thus producing 50% more grains per plant. The ectopic expression of Ghd8 in Arabidopsis caused early flowering by 10 d-a situation similar to the one observed by its homolog AtHAP3b, when compared to wild-type under long-day conditions; these findings indicate the conserved function of Ghd8 and AtHAP3b in flowering in Arabidopsis. Our results demonstrated the important roles of Ghd8 in rice yield formation and flowering, as well as its opposite functions in flowering between rice and Arabidopsis under long-day conditions.