Integrating Artificial Intelligence (AI) into the internal audit functions of the public sector poses certain challenges, hindering its usage. The purpose of our study is to identify and understand the main factors hindering the integration of this advanced technology within the internal audit functions of the Moroccan public sector. Using an interpretivist approach and qualitative methodology, we applied the Technology-Organization-Environment framework and collected data through semi-structured interviews with 14 public sector internal auditors. Firstly, from a technological point of view, the major barriers encompass the incompatibility of the technological infrastructure, the absence of adequate technological skills, and the complexity of AI. Secondly, in the organizational context, major barriers are the investment cost and the nature of the public sector’s activities. Finally, on the environmental level, the absence of a clear regulatory text and adequate technical assistance are barriers hindering AI integration. Addressing these obstacles is key to a successful integration of AI within internal auditing in Morocco’s public sector, enabling a better quality of public sector audits. This study contributes to the literature on AI in auditing by providing an empirical perspective on the perceived barriers in developing countries’ public sectors.