Irregular electrical impulses in atrium are the leading cause of atrial fibrillation (AF), resulting in fatal arrhythmia and sudden cardiac death. Traditional medication and physical therapies are widely used, but generally suffer problems in serious physical damage and high surgical risks. Flexible and soft implants have great potential to be a novel approach for heart diseases therapy. A conductive hydrogel-based mesh cardiac patch is developed for application in AF elimination. The designed mesh patch with rhombic-shaped structure exhibits excellent flexibility, surface conformability, and deformation compliance, making it fit well with heart surface and accommodate to the deformation during heart beating. Moreover, the mechanical elastic and shape-memory properties of the mesh patch enable a minimally invasive injection of the patch into living animals. The mesh patch is implanted on the atrium surface for one month, indicating good biocompatibility and stability. Furthermore, the conductive patch can effectively eliminate AF owing to the conductivity and high charge storage capability (CSC) of the hydrogel. The proposed scheme of cardiac bioelectric signal modulation using conductive hydrogel brings new possibility for the treatment of arrhythmia diseases.