The mechanism of good corporate governance is used to prevent the management of the company from engaging in unethical actions, such as the earnings management. It can be an effective way to control management. This study aims to analyse corporate governance, consisting of the size of the board of commissioners, the size of the sharia supervisory board, and the audit committee on financial performance, measured as return on assets (ROA), with earnings management as the mediating variable. The sample used for the study consists of nine Indonesian shariah banks and the period of analysis is 2013-2017. The results of the path analysis show that the size of the board of commissioners has a negative effect on the company’s ROA. The study also finds that the size of the sharia supervisory board, audit committee and earnings management do not have significant effects on financial performance. Earnings management has a positive mediating role on the relationship between the board of commissioners, the audit committee and ROA. This finding indicates that the existence of the board of commissioners is effective in supervising the management. Thus the mechanism corporate governance can limit the managers’ discretionary behavior and prevent earnings management.