Terrestrial animals and robots are susceptible to flipping-over during rapid locomotion in complex terrains. However, small robots are less capable of self-righting from an upside-down orientation compared to small animals like insects. Inspired by the winged discoid cockroach, we designed a new robot that opens its wings to self-right by pushing against the ground. We used this robot to systematically test how self-righting performance depends on wing opening magnitude, speed, and asymmetry, and modeled how kinematic and energetic requirements depend on wing shape and body/wing mass distribution. We discovered that the robot self-rights dynamically using kinetic energy to overcome potential energy barriers, that larger and faster symmetric wing opening increases self-righting performance, and that opening wings asymmetrically increases righting probability when wing opening is small. Our results suggested that the discoid cockroach's winged self-righting is a dynamic maneuver. While the thin, lightweight wings of the discoid cockroach and our robot are energetically sub-optimal for self-righting compared to tall, heavy ones, their ability to open wings saves them substantial energy compared to if they had static shells. Analogous to biological exaptations, our study provided a proof-of-concept for terrestrial robots to use existing morphology in novel ways to overcome new locomotor challenges.