Heterogeneous growth in a myriad of biological systems can lead to the formation of distinct morphologies during the maturation processes of different species. We demonstrate that the distinct circumferential buckling observed in pumpkins can be reproduced by a core-shell barrel structure using four-dimensional (4D) printing, taking advantage of digital light processing (DLP)-based three-dimensional (3D) printing and stimulus-responsive hydrogels. The mechanical mismatch between the stiff core and compliant shell results in buckling instability on the surface. The initiation and development of the buckling are governed by the ratio of core/shell radius, the ratio of core/shell swelling ratios, and the mismatch between the core and shell in stiffness. Furthermore, the rigid core not only acts as a source of circumferential confinement but also sets a boundary at the poles of the entire structure. The heterogeneous structures with controllable buckling geometrically and structurally behave much like plants' fruits. This replicates the biological morphologic change and elucidates the general mechanism and dynamics of the complex instability formation of heterogeneous 3D objects.