PurposeThis research aims to examine the relations between Shariah compliance and earnings quality.Design/methodology/approachThe authors study three Shariah features: Shariah compliance status, level of Shariah compliance (H-Score) and Shariah compliance persistence. The sample consists of 463 firms from the Middle East and North Africa from 2011 to 2018. A variable determining the level of Shariah compliance was created in accordance with the methodology of S&P 500 Shariah and its underlying index, S&P 500. Then, a probate relapse study was created to identify the link between Shariah compliance and earnings quality.FindingsResults show that Shariah-compliant firms engage in lower earnings management compared to their Shariah-non-compliant counterparts. This paper reveals that Shariah compliance status and high level of Shariah compliance have significant positive association with earnings quality. The authors also find novel evidence that persistence of the Shariah-compliant status has a significant negative association with earnings quality.Practical implicationsThis study only examines firms listed on MENA stock markets. It is recommended to further study different markets in addition to the emerging Arab markets in order to compare and contrast the results. Further, larger sample observations from a greater date range can be used.Originality/valueFew studies have examined the earnings management behavior of Shariah-compliant firms vs Shariah-non-compliant ones in emerging markets; however, no study has focused on Shariah-compliant firms and their level of Shariah compliance. To the best of our knowledge, this is the first study which uses all four proxies for earnings quality in association with Shariah compliance and used new Shariah variables such as Level of Shariah Compliance and Persistent Shariah Compliance status.