Summary Panicle size and grain number are important agronomic traits that determine grain yield in rice. However, the underlying mechanism regulating panicle size and grain number remains largely unknown. Here, we report that GS2 plays an important role in regulating panicle architecture. The RNAi of GS2™ (target site mutation, TM) produced erect and dense panicle with increased primary and secondary branches and grain number per panicle, whereas the overexpression of GS2™ showed longer panicles and fewer grains than wild‐type. GS2 directly binds to the GCCA motif and significantly enhances the transcriptional activation ability through the interaction with IPA1. DEP1 is a common target gene of GS2 and IPA1 in regulating branch number and grain number per panicle. The pyramiding of GS2™ and IPA1™ 1 (Target site mutation1, TM1) on hybrid rice can significantly increase rice yield. Our findings reveal the novel function of GS2 and the molecular mechanism of GS2 / IPA1 ‐ DEP1 module in controlling panicle architecture.