We have demonstrated that ATP‐sensitive potassium (KATP) channel agonists attenuated fibrosis; however, the mechanism remained unclear. Since RhoA has been identified as a mediator of cardiac fibrosis, we sought to determine whether the anti‐fibrotic effects of KATP channel agonists were mediated via regulating macrophage phenotype and fibroblast differentiation by a RhoA/RhoA‐kinase‐dependent pathway. Wistar male rats after induction of myocardial infarction were randomized to either vehicle, nicorandil, an antagonist of KATP channel glibenclamide, an antagonist of ROCK fasudil, or a combination of nicorandil and glibenclamide or fasudil and glibenclamide starting 24 hrs after infarction. There were similar infarct sizes among the infarcted groups. At day 3 after infarction, post‐infarction was associated with increased RhoA/ROCK activation, which can be inhibited by administering nicorandil. Nicorandil significantly increased myocardial IL‐10 levels and the percentage of regulatory M2 macrophages assessed by immunohistochemical staining, Western blot, and RT‐PCR compared with vehicle. An IL‐10 receptor antibody increased myofibroblast infiltration compared with nicorandil alone. At day 28 after infarction, nicorandil was associated with attenuated cardiac fibrosis. These effects of nicorandil were functionally translated in improved echocardiographically derived cardiac performance. Fasudil showed similarly increased expression of M2 macrophages as nicorandil. The beneficial effects of nicorandil on fibroblast differentiation were blocked by adding glibenclamide. However, glibenclamide cannot abolish the attenuated fibrosis of fasudil, implying that RhoA/RhoA‐kinase is a downstream effector of KATP channel activation. Nicorandil polarized macrophages into M2 phenotype by inhibiting RhoA/RhoA‐kinase pathway, which leads to attenuated myofibroblast‐induced cardiac fibrosis after myocardial infarction.