The present study was designed to explore the role of M2 macrophage-derived exosomes (M2-exos) on the KCa3.1 channel in a cellular atrial fibrillation (AF) model using rapidly paced HL-1 myocytes. M2 macrophages and M2-exos were isolated and identified. MicroRNA (miR)-146a-5p levels in M2 macrophages and M2-exos were quantified using reverse transcription-quantitative PCR (RT-qPCR). HL-1 myocytes were randomly divided into six groups: Control group, pacing group, pacing + coculture group (pacing HL-1 cells cocultured with M2-exos), pacing + mimic-miR-146a-5p group, pacing + NC-miR-146a-5p group and pacing + pyrrolidine dithiocarbamate (PDTC; a special blocker of the NF-κB signaling pathway) group. Transmission electron microscopy, nanoparticle tracking analysis, western blotting, RT-qPCR and immunohistochemistry were performed in the present study. A whole-cell clamp was also applied to record the current density of KCa3.1 and action potential duration (APD) in each group. The results revealed that miR-146a-5p was highly expressed in both M2 macrophages and M2-exos. Pacing HL-1 cells led to a shorter APD, an increased KCa3.1 current density and higher protein levels of KCa3.1, phosphorylated (p-)NF-κB p65, p-STAT3 and IL-1β compared with the control group. M2-exos, miR-146a-5p-mimic and PDTC both reduced the protein expression of KCa3.1, p-NF-κB p65, p-STAT3 and IL-1β and the current density of KCa3.1, resulting in a longer APD in the pacing HL-1 cells. In conclusion, M2-exos and their cargo, which comprised miR-146a-5p, decreased KCa3.1 expression and IL-1β secretion in pacing HL-1 cells via the NF-κB/STAT3 signaling pathway, limiting the shorter APD caused by rapid pacing.