With the advent of Internet of Everything (IoE) and the era of big data, massive multiple-input multiple-output (MIMO) is considered an essential technology to meet the growing communication requirements for beyond 5G and the forthcoming 6G networks. This paper considers a secure massive MIMO system, where the legitimate user and the base station (BS) exchange messages via two-way relays with the presence of passive eavesdroppers. To achieve the trade-off between the physical-layer security and communication reliability, we design a cooperative transmission mode based on multiple-relay collaboration, where some relays broadcast the received signals and other relays act as friendly jammers to prevent the interception by eavesdroppers. A quantum chemical reaction optimization (QCRO) algorithm is proposed to find the most suitable scheme for multiple-relay collaboration. Simulation results highlight excellent performance of the proposed transmission mode under QCRO in different communication scenarios, which can be considered a potential solution for the security issue in future wireless networks.