This paper investigates the stock–bond dependence structure using a dependence-switching copula model. The model allows stock–bond dependence to switch between positive dependence regimes (contagions or crashes of the two markets during downturns or booms in both markets during upturns) and negative dependence regimes (flight-to-quality from stock markets to bond markets or flight-from-quality from bond markets to stock markets). Using data from four developed markets including the US, Canada, Germany, and France for the period between January 1985 and August 2022, we find that the within-country stock–bond (extreme) dependence could be both positive and negative. In the positive dependence regimes, the stock–bond dependence is asymmetric with stronger left tail dependence than the right tail dependence, giving evidence of a higher likelihood of joint stock–bond market crashes or contagions during market downturns than the collective stock–bond market booms. Under the negative dependence regimes, we find both flight-from-quality and flight-to-quality, with flight-to-quality being more dominant in the North American markets while flight-from-quality is more prominent in the European markets. Further, the dependence switches between positive and negative regimes over time. Moreover, the dependence is mainly in the positive regimes before 2000 while mostly in the negative regimes after that, indicating contagions mostly before 2000 and flights afterwards. Further, the dependence switches between positive and negative regimes around financial crises and the COVID-19 pandemic. These results greatly enrich the findings in the existing literature on the co-movements of stock–bond markets and are important for risk management and asset pricing.