Abstract We study the possibility to find the axion-like particles (ALPs) through the leptonic decays of heavy mesons. The Standard Model (SM) predictions of the branching ratios of the leptonic decays of heavy mesons are less than corresponding experimental upper limits. This provides some space for the existence of decay channels where the ALP is one of the products. Three scenarios are considered: first, the ALP is only coupled to one single charged fermion, namely, the quark, the antiquark, or the charged lepton; second, the ALP is only coupled to quark and antiquark with the same strength; third, the ALP is coupled to all the charged fermions with the same strength. The constraints of the coupling strength in different scenarios are obtained by comparing the experimental data of the branching ratios of leptonic decays of $B^-$, $D^+$, and $D_s^+$ mesons with the theoretical predictions which are achieved by using the Bethe-Salpeter (BS) method. These constraints are further applied to predict the upper limits of the leptonic decay processes of the $B_c^-$ meson in which the ALP participates.Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. Article funded by SCOAP3 and published under licence by Chinese Physical Society and the Institute of High Energy Physics of the Chinese Academy of Science and the Institute of Modern Physics of the Chinese Academy of Sciences and IOP Publishing Ltd.