Rice plant architecture is an important agronomic trait and a major determinant in high productivity. Panicle erectness is the preferred plant architecture in japonica rice, but the molecular mechanism underlying domestication of the erect panicle remains elusive. Here we report the map-based cloning of a major quantitative trait locus, qPE9-1, which plays an integral role in regulation of rice plant architecture including panicle erectness. The R6547 qPE9-1 gene encodes a 426-amino-acid protein, homologous to the keratin-associated protein 5-4 family. The gene is composed of three Von Willebrand factor type C domains, one transmembrane domain, and one 4-disulfide-core domain. Phenotypic comparisons of a set of near-isogenic lines and transgenic lines reveal that the functional allele (qPE9-1) results in drooping panicles, and the loss-of-function mutation (qpe9-1) leads to more erect panicles. In addition, the qPE9-1 locus regulates panicle and grain length, grain weight, and consequently grain yield. We propose that the panicle erectness trait resulted from a natural random loss-of-function mutation for the qPE9-1 gene and has subsequently been the target of artificial selection during japonica rice breeding.