Sepsis-induced myocardiopathy, characterized by innate immune cells infiltration and proinflammatory cytokines release, may lead to perfusion failure or even life-threatening cardiogenic shock. Macrophages-mediated inflammation has been shown to contribute to sepsis-induced myocardiopathy. In the current study, we introduced two photoactivated adenylyl cyclases (PACs), Beggiatoa sp. PAC (bPAC) and Beggiatoa sp. IS2 PAC (biPAC) into macrophages by transfection to detect the effects of light-induced regulation of macrophage pro-inflammatory response and LPS-induced sepsis-induced myocardiopathy. By this method, we uncovered that blue light-induced bPAC or biPAC activation considerably inhibited the production of pro-inflammatory cytokines IL-1 and TNF-α, both at mRNA and protein levels. Further, we assembled a GelMA-Macrophages-LED system, which consists of GelMA-a type of light crosslink hydrogel, gene modulated macrophages and wireless LED device, to allow light to regulate cardiac inflammation in situ with murine models of LPS-induced sepsis. Our results showed significant inhibition of leukocytes infiltration, especially macrophages and neutrophils, suppression of pro-inflammatory cytokines release, and alleviation of sepsis-induced cardiac dysfunction. Thus, our study may represent an emerging means to treat sepsis-induced myocardiopathy and other cardiovascular diseases by photo-activated regulating macrophage function.