Background Brain injury is the main cause of high mortality and disability after successful cardiopulmonary resuscitation (CPR) from sudden cardiac arrest (CA). Transient receptor potential M4 (TRPM4) channel is a novel target for ameliorating blood-brain barrier (BBB) disruption and neuroinflammation. Herein, we tested whether flufenamic acid (FFA), which is reported to block TRPM4 with high potency, confers neuroprotection against brain injury secondary to CA/CPR and whether the action is exerted by blocking the TRPM4 channel. Methods Wild-type (WT) and Trpm4 knockout (Trpm4−/−) mice subjected to 10-min CA/CPR were randomized to receive FFA or vehicle once daily. Post-CA/CPR brain injuries including neurological deficits, survival rate, histological damages, edema formation, BBB destabilization and neuroinflammation were assessed. Results In WT mice subjected to CA/CPR, FFA was effective in improving survival and neurologic outcome, reducing neuropathological injuries, attenuating brain edema, lessening leakage of IgG, restoring tight junction protein expression as well as promoting microglia/macrophages from the pro-inflammatory subtype towards the anti-inflammatory one. In comparison to WT mice, Trpm4−/− mice exhibited less neurologic deficiency, lighter histological impairment, more integrity of BBB and more anti-inflammatory microglia/macrophages polarization. As expected, FFA did not provide a benefit of superposition compared with vehicle in the Trpm4−/− mice after CA/CPR. Conclusions FFA mitigates BBB breach and modifies the functional status of microglia/macrophages, thereby improving survival and neurological deficits following CA/CPR. The neuroprotective effects are at least partially through interfering with the TRPM4 channel. These results provide significant clinical potentials to improve the prognosis for CA victims with successful resuscitation.