This paper studies how the credit expansion policy pursued by the Chinese government in an effort to stimulate its economy in the post-crisis period affects bank–firm loan contracts and the macroeconomy. We build a structural model with financial frictions in which the optimal loan contract reflects the trade-off between leverage and the probability of default. Credit expansion is introduced in the form of the government's partial guarantee on bank loans to (i) general production firms or (ii) infrastructure producers. We show that in the case of general credit expansion, more persistent credit shocks lead to higher credit multipliers at all horizons, as the benefits of persistently alleviating firms' borrowing constraint outweigh the costs associated with higher non-performing loans. We also show that a more persistent targeted credit expansion raises the production of infrastructure goods. However, higher infrastructure production not only boosts the public capital stock and generates positive externalities, it also crowds out private investment and consumption. With a short-lived targeted credit easing, the expansionary channel of public capital dominates, boosting output. As the credit expansion becomes more persistent, the contractionary channel of lower private investment starts to outweigh the expansionary channel in the medium term.