The invention provides a tin alloy electroplating solution. The tin alloy electroplating solution comprises organic mixed acid, organic tin salt, organic metal salt, complexing agents, reducing agents, stabilizing agents, refining agents, brightening agents and deionized water. The tin alloy electroplating solution comprises, by weight, 1000 parts of deionized water, 100-600 parts of organic mixedacid, 40-100 parts of organic tin salt, 1-8 parts of organic metal salt, 50-160 parts of complexing agents, 30-70 parts of reducing agents, 20-100 parts of stabilizing agents, 5-20 parts of refiningagents and 3-15 parts of brightening agents. The organic metal salt comprises one of organic silver salt, organic copper salt and organic bismuth salt. The complexing agents comprise one or more of thiourea, 1,3-dimethylthiourea, 2,4-dithiobiuret, 2,4,6-trithio-triuret, 2,2-dithiodipyridine, 2,2-dithio-aniline, tetramethyl guanidine, guanidinoacetic acid, creatine monohydrate and sulphydryl chitosan.