We examine the design of loan contract terms in the presence of borrower pre-issuance real earnings management (REM). Unlike other measures of earnings quality, REM is particularly difficult for outsiders to detect. However, lenders possess some private information which may allow them to correctly identify REM. Our empirical findings show that greater REM is associated with higher interest spreads, shorter maturities, a higher likelihood of imposing collateral requirements, and more intensive financial covenants, suggesting that lenders are likely to detect and penalise the borrower firm’s REM activities. These findings are robust to a series of sensitivity tests. In an additional test, we examine the impact of REM on bond terms and document that greater REM is related to higher bond yield spreads and more intensive covenants, but does not affect the maturity term or the collateral requirement. The findings in this paper can alert firms about the increase in borrowing costs when they use REM to boost current-period earnings.