The invention relates to a halogen-free and lead-free solder paste and a preparation method. The preparation method is characterized in that the method comprises the steps of adding diethylene glycol monobutyl ether, castor oil and polyisobutene in a temperature control emulsifying machine and mixing, then adding albolene, polymerized rosin and hydrogenated rosin and mixing again to obtain first mixing solution, reducing the temperature of the first mixing solution, adding succinic acid, sebacic acid and glutaric acid, and mixing again to obtain second mixing solution, reducing the temperature of the second mixing solution, adding polyamide wax and mixing again to obtain third mixing solution, reducing the temperature of the third mixing solution, adding a fluorocarbon surfactant and diethanol amine, then stirring and vacuuming until the temperature is restored to the room temperature, standing for 24h with low temperature, then adding lead-free electronic-grade tin alloyed powder Sn96.5Ag3.0Cu0.5, and stirring to obtain the halogen-free and lead-free solder paste. After being welded, the halogen-free and lead-free solder paste has the advantages and effects of fewer residues, extremely high surface insulation resistance, low corrosion, no needing of cleaning, good thixotropic property and electric conductivity, bright welding points after welding and incapability of collapsing easily.