The phenomenon of tax avoidance in Indonesia remains a significant issue, one of which is the case of PT. Adaro Energy Tbk, which practiced tax avoidance through transfer pricing to its subsidiary in Singapore, Coaltrade Service International, from 2009 to 2017. Based on this phenomenon, this study aims to analyze the effect of leverage and profitability on tax avoidance with transfer pricing as a moderating variable in coal subsector energy companies listed on the Indonesia Stock Exchange (IDX) for the 2021–2023 period. This study uses descriptive analysis methods, classical assumption tests, Moderated Regression Analysis (MRA), and hypothesis testing with t-tests. The data processing tool used is SPSS version 23. The study population consisted of 45 companies, and through purposive sampling technique, 12 companies were obtained as samples with a three-year observation period, resulting in a total sample of 36 data. The results show that leverage has a positive effect on tax avoidance, while profitability has no effect on tax avoidance. Meanwhile, transfer pricing has a negative effect on tax avoidance. Interestingly, transfer pricing has been shown to strengthen the relationship between leverage and tax avoidance, as well as the relationship between profitability and tax avoidance. This finding confirms that "transfer pricing can be a significant moderating factor in corporate tax management strategies." Therefore, the results of this study contribute to understanding tax avoidance practices in the coal subsector for companies and regulators, as well as providing policy implications for tax regulations in Indonesia.