A moral hazard model with exogenous bank franchise value is used to analyze bank capital regulation. Banks choose their capital structure as well as the riskiness and mean of their portfolio. The portfolio mean is determined by the level of costly screening. Screening and portfolio risk are private information, so there are two dimensions to the moral hazard problem. Deposit insurance gives banks an incentive to hold less capital, and to choose a higher-risk, lower-mean portfolio. To mitigate these incentives, capital requirements with and without ex post fines are studied. We find an endogenous reverse mean-variance trade-off in banks' portfolios. Prudent banks choose high-screening, low-risk portfolios and are virtually self regulating. Imprudent banks choose low-screening, high-risk portfolios. Without state-contingent penalties, optimal capital regulations are often V-shaped in bank franchise value. Adding state-contingent regulation can significantly lower capital requirements. Optimal state-contingent regulations are characterized by fines on extreme right-hand-tail returns.