Atrial fibrillation (AF) commonly occurs after surgery and is associated with atrial remodeling. TRPV4 is functionally expressed in the heart, and its activation affects cardiac structure and functions. We hypothesized that TRPV4 blockade alleviates atrial remodeling and reduces AF induction in sterile pericarditis (SP) rats. TRPV4 antagonist GSK2193874 or vehicle was orally administered 1 d before pericardiotomy. AF susceptibility and atrial function were assessed using in vivo electrophysiology, ex vivo optical mapping, patch-clamp, and molecular biology on day 3 after surgery. TRPV4 expression increased in the atria of SP rats and patients with AF. GSK2193874 significantly reduced AF vulnerability in vivo and the frequency of atrial ectopy and AF with a reentrant pattern ex vivo. Mechanistically, GSK2193874 reversed the abnormal action potential duration (APD) prolongation in atrial myocytes through the regulation of voltage-gated K+ currents (IK), reduced the activation of atrial fibroblasts by inhibiting P38, AKT, and STAT3 pathways, and alleviated the infiltration of immune cells. Our results reveal that TRPV4 blockade prevents abnormal changes in atrial myocyte electrophysiology and ameliorated atrial fibrosis and inflammation in SP rats, and, therefore, might be a promising strategy to treat AF, particularly post-operative AF.