Using conventional regressions and generalized regression neural networks (GRNNs), we examine the relationship between corporate governance (CG) and earnings management (EM). We also examine whether governance quality moderates the association between EM and CG for a sample of British and Egyptian companies. Our findings show that: (a) UK firms are likely to have lower levels of EM if they: have smaller boards, are dominated by independent outside directors, and have a low percentage of female directors; (b) Egyptian firms are likely to have lower levels of EM if they: have larger boards, are dominated by independent outside directors, and have a low percentage of female directors; (c) The governance quality (control of corruption) has a significant hidden effect on EM. Since our results provide empirical evidence that the board of directors plays a vital role in mitigating EM, these findings might lead to an improvement in the credibility of financial statements for investors in both the UK and Egypt. As policy implications, our findings inform regulators and policy-makers that corruption has a very strong hidden effect on EM and that they can deter EM by controlling the corruption level in their countries.