We study the QCD topology and axion properties at finite temperature and chemical potential in the framework of the two-flavor Nambu–Jona-Lasinio model. We find that the behaviors of the two lowest cumulants of the QCD topological charge distribution and axion properties are highly sensitive to the critical behavior of the chiral phase transition. In particular, the topological susceptibility and the axion mass follow the response of the chiral condensate to temperature and chemical potential, showing that both quantities decrease monotonically with the increment of temperature and/or chemical potential. However, it is important to note that the normalized fourth cumulant behaves differently depending on the temperature. At low temperatures, it is a non-monotonic function of the chemical potential, while at high temperatures, it monotonically decreases. Additionally, its value invariably approaches the asymptotic value of $$b_2^{\text {inst}}=-1/12$$
b
2
inst
=
-
1
/
12
, predicted by the dilute instanton gas model. We also observe that with the increase in chemical potential at relatively low temperatures, the axion self-coupling constant exhibits a sharp peak around the critical point, which can even be more than twice its vacuum value. After that, the self-coupling drops sharply to a much lower value than its vacuum value, eventually approaching zero in the high chemical potential limit. The finding that the axion self-coupling constant is significantly enhanced in high-density environments near the chiral phase transition could lead to the creation or enhancement of an axion Bose–Einstein condensate in compact astrophysical objects.