Following treatment, the electrode is cleared from the body, eliminating the need for surgical extraction. The mixture adheres to the beating heart in vivo without disrupting its normal rhythm. The electrofunctionalized injectable cardiac stimulator demonstrates a tissue-compatible Young’s modulus of 21 kPa and a high conductivity of 55 S/cm. The injected electrode facilitates electrocardiogram measurements, regulates heartbeat in vivo, and rectifies arrhythmia. Conductive functionality is maintained for five consecutive days, and no toxicity is observed at the organism, organ, or cellular levels.