Pancreatic cancer, as one of the most aggressive and lethal malignancies in the world, is lack of effective treatment. Constructing immunotoxin molecules to target the mesothelin (MSLN) receptor is a potential therapeutic strategy for pancreatic cancer and other related malignant tumors, with some molecules being tested in clinical trials. However, currently, there are still some limitations in its applications, such as the difficulty of the preparation of drug molecules, the limited effectiveness of drugs, and the inadequacy of drug safety and immunogenicity. In this study, we constructed a novel type of anti-MSLN immunotoxin, A1-PE24X7, in which a single domain antibody (sdAb) molecule was used as the target ligand and an improved PE24X7 toxin with reduced off-target toxicity and immunogenicity was used as the effector. Unlike conventional immunotoxins, the designed A1-PE24X7 could be easily expressed in the E. coli system in the form of a soluble protein with a good yield (15--20 mg/L), avoiding the complex process of denaturation and refolding of inclusion bodies, and it can be conveniently stored in PBS solution for more than 7 days at 4 °C, showing high storage stability. Cell-based experiments showed that A1-PE24X7 entered MSLN-expressing tumor cells in a receptor-mediated manner and killed these cells with an EC50 in the low nanomolar range (0.13 nM against NCI-N87 cells and 0.79 nM against AsPC-1 cells) and it showed ideal selectivity for the MSLN receptor (>100 nM against receptor negative PC3 cells). In animal-based experiments, A1-PE24X7 had tumor enrichment ability in relation to MSLN-positive tumors and showed strong tumor killing and inhibition in mouse models of pancreatic cancer and gastric cancer. Five injections of 3.0 mg/kg A1-PE24X7 significantly reduced the tumor volume of gastric NCI-N87 cancer and also significantly inhibited the growth of pancreatic AsPC-1 cancer. In addition, the maximum tolerable dosage (MSD) of A1-PE24X7 to mice was higher than 15 mg/kg, showing that A1-PE24X7 has a relatively broad therapeutic window. These preclinical results indicate that this strategy has good potential for application to the treatment of pancreatic cancer and other tumors with high MSLN expression.