During the U.S. subprime mortgage crisis, credit default swaps (CDS) played a pivotal role and became an influential booster. However, most studies only study the systemic risk of CDS in the interbank market and do not quantify how CDS speculation affects the systemic risk. Therefore, to study the impact of CDS speculation on the systemic risk, this paper constructs a multi-layered complex network, which includes bank-firm-CDS sellers to reproduce speculation in the CDS market. Then, the impact of different CDS speculation ratios and regulatory ratios on the banking systemic risk of a multi-layered complex network are investigated separately under different credit shocks. The results show that the systemic risk is positively correlated with the CDS speculation ratio, and that speculation adversely influences system stability, although it is profitable for some banks. Moreover, the effectiveness of the regulation is affected by the size of credit shocks, if credit shocks are large, the systemic risk is negatively related to regulatory ratios. Because the regulation system on CDS sellers limits the expansion of the CDS market, reduces the counterparty risk for banks, and makes the banking system more stable. Instead, if credit shocks are low, strict regulation has the potential to increase the systemic risk. The study provides a novel perspective on utilizing rational credit risk mitigation instruments to prevent systemic risks.