We systematically investigate the influence of annealing effect on terahertz (THz) generation from CoFeB based magnetic nanofilms driven by femtosecond laser pulses. Three times enhancement of THz yields are achieved in W/CoFeB through annealing effect, and double boosting is obtained in Pt/CoFeB. The mechanism of annealing effect originates from the increase of hot electron mean free path induced by crystallization, which is experimentally corroborated by THz transmission measurement on time-domain spectroscopy. Comparison studies of the thickness dependent THz efficiency after annealing are also implemented, and we eventually conclude that annealing and thickness optimization are of importance for scaling up THz intensity. Our observations not only deepen understanding of the spintronic THz radiation mechanism but also provide normal platform for high speed spintronic opto-electronic devices.