Physiological theories of emotion have hypothesized that bodily signals such as accelerated heart rate can contribute or even give rise to changes in emotional states. To determine how the body communicates with the brain, we established a noninvasive optical pacemaker that enabled direct depolarization of cardiomyocytes in freely-moving mice. We find that optically-induced tachycardia accentuated anxiety-like behavior and that cardiac interoception was represented in the posterior insular cortex. Optogenetic inhibition of the insula attenuated cardiogenic effects on anxiety. These findings support a more generalized function for the insula in monitoring both consummatory and entirely internal interoceptive states to instruct relevant behavioral responses.