Given the evolving digitalization in education, teachers' artificial intelligence (AI) literacy has become increasingly important for professional development. On the basis of the data collected from 189 primary and secondary school teachers, this study aims to (1) assess teachers' AI literacy in four dimensions (i.e., affective, behavioral, cognitive, and ethical learning), (2) investigate how teachers' background characteristics (e.g., gender, teaching experience, and educational background) and technological knowledge (e.g., digital readiness) are related to their AI literacy, and (3) examine whether AI literacy mediates the relationship between digital readiness and subjective well-being. Results show that the participating teachers generally demonstrated a high level of overall AI literacy, with outstanding performance in the ethical and behavioral dimensions, yet room for improvement in the cognitive dimension. Gender, teaching experience, and educational background did not significantly link to AI literacy, whereas digital readiness was positively related to AI literacy. Furthermore, AI literacy played a significant positive mediating role between digital readiness and subjective well-being. This study reveals AI literacy's contribution to teachers' holistic development, underscoring its importance in promoting teachers' subjective well-being in the digital education context.