We discuss the resonant activation phenomenon on a Josephson junction due to the coupling of the Josephson system with axions. We show how such an effect can be exploited for axion detection. A nonmonotonic behavior, with a minimum, of the mean switching time from the superconducting to the resistive state versus the ratio of the axion energy and the Josephson plasma energy is found. We demonstrate how variations in switching times make it possible to detect the presence of the axion field. An experimental protocol for observing axions through their coupling with a Josephson system is proposed. o̧pyright 2022 American Physical Society.