Implantable functional electrical stimulation (IFES) has demonstrated its effectiveness as an alternative treatment option for diseases incurable pharmaceutically (e.g., retinal prosthesis, cochlear implant, spinal cord implant for pain relief). However, the development of IFES for gastrointestinal (GI) tract modulation is still limited due to the poorly understood GI neural network (gut⁻brain axis) and the fundamental difference among activating/monitoring smooth muscles, skeletal muscles and neurons. This inevitably imposes different design specifications for GI implants. This paper thus addresses the design requirements for an implant to treat GI dysmotility and presents a miniaturized wireless implant capable of modulating and recording GI motility. This implant incorporates a custom-made system-on-a-chip (SoC) and a heterogeneous system-in-a-package (SiP) for device miniaturization and integration. An in vivo experiment using both rodent and porcine models is further conducted to validate the effectiveness of the implant.