Flexible manipulation of terahertz-wave polarization during the generation process is very important for terahertz applications, especially for the next-generation on-chip functional terahertz sources. However, current terahertz emitters could not satisfy such demand, hence calling for new mechanism and conceptually new terahertz source. Here we demonstrate a magnetic-field-controlled, highly-efficient, cost-effective, and broadband terahertz source with flexible switch of terahertz polarization states in ferromagnetic heterostructures driven by femtosecond laser pulses. We verify that the chirality, azimuthal angle, and ellipticity of the generated elliptical terahertz waves can be independently manipulated by delicately engineering of the external applied magnetic fields via effectively manipulating the photo-induced spin currents. Such an ultrafast photomagnetic interaction-based, magnetic-field-controlled, and broadband tunable solid-state terahertz source integrated with terahertz polarization tunability function not only has the capability to reveal physical mechanisms of femtosecond spin dynamics, but also demonstrates the feasibility to realize novel on-chip terahertz functional devices, boosting the potential applications for controlling elementary molecular rotations, phonon vibrations, spin precessions, high-speed terahertz communication, and accelerating the development of ultrafast terahertz opto-spintronics.