This paper examines the contribution of Artificial Intelligence (AI) to the learning and teaching of History in secondary education. The first part presents the theoretical framework and provides an extensive literature review on the applications, pedagogical benefits, and challenges of AI in the school environment. The second part provides a critical assessment of the international literature, with an emphasis on research gaps and the contribution of the present study. The research methodology is then described, and a case study of the application of an educational scenario in the second-grade classes of a secondary school is analysed. The scenario refers to the use of AI tools, and to how to create first-person historical narratives. Finally, the research findings are presented, and compared to international examples, highlighting the potential for the pedagogically sound, and creative integration of Information Technology (IT) in the teaching of History. Article visualizations: