Investigating the state of cells in zero magnetic or near-zero magnetic environments is an important scientific issue. However, standard cell culture incubators can only provide general conditions such as constant temperature, constant humidity, sterility, and carbon dioxide, and cannot provide zero magnetic or near-zero magnetic environments for cell culture. To address this issue, an optimization method was proposed in this paper based on the combination of the particle swarm optimization algorithm (PSO) and the finite element method (FEM), achieving the optimization design of a magnetic shielding box (MSB) with a small volume, high shielding factor, and low residual field. Firstly, the high-permeability layer and high-conductivity layer were optimized respectively using the PSO and FEM. Then, the effectiveness of this method was analyzed through experiments. The experimental results show that the shielding factors in three directions at the center point of the optimized MSB are 786.8 (east-west), 2182.7 (north-south), and 1389.4 (vertical) respectively at 0.01 Hz. Meanwhile, the maximum residual field in the cubic region with a side length of 10 cm inside the MSB is 11.9 nT. Finally, the MSB designed by this method was placed in a standard cell culture incubator to cultivate cells in a zero-magnetic or near-zero magnetic environment. Then the Cell Counting Kit-8 (CCK8) experiments to evaluate the cytotoxicity of chemotherapy drugs on tumor cells in a weak magnetic environment (WMF). The results show that the lethality of paclitaxel (PTX) to Epidermal carcinoma cell (A431) increases by 25.96 times and the lethality of gemcitabine (GE) to Lung carcinoma cell (NCI-H460) increases by 24.23 times in a WMF. At the same time, the maximum proliferation inhibition rate of 5-fluorouracil (5-FU) on NCI-H460 cells in a WMF environment increased by 15.69%. That is, WMF could significantly improve the therapeutic effect of chemotherapy drugs on tumor cells.