In this work uniform high magnetic field of up to 12 tesla and well-defined magnetic field gradients were in-situ applied during the electrodeposition process of CoFe alloy films on Si(100) substrate with Ni seed-layer. The evolution of morphology obtained by LSCM and AFM revealed that the electrodeposition under uniform or gradient magnetic fields provides advantage of forming high quality films with small grains size and low surface roughness. The X-ray diffraction measurements revealed that the crystalline structure of the films changed with the increase of magnetic flux density from face-centered cubic (fcc) at 0 T to body-centered cubic (bcc) at 12 T. However, the formation of a mixture phase (fcc+bcc) under gradient magnetic fields reflected a negative effect of the field gradient force on the transformation from fcc phase to bcc phase. With increasing magnetic flux density (B), the saturation magnetization (Ms) and coercive force (Hc) of the films increased, while in the case of B = 12 T, both of Ms and Hc decreased. It could be ascribed to the changes in the chemical composition and the formation of the mixture phases, due to the combined effects of the paramagnetic force, micro-MHD and the field gradient force under different magnetic field conditions. Soft magnetic films have been widely used in the fields of magnetic recordings, magnetic sensors and micro-electromechanical system (MEMS). 1-2 As a kind of typical soft magnetic materials, CoFe alloy films exhibit the highest saturation magnetization of 2.45 T and lower coercivity of about 2 Oe. 1 The magnetic properties of CoFe films depend on their morphology, crystal structure and composition. Although there are many methods available for the preparation of CoFe films, such as sputtering, molecular beam epitaxy, ion beam deposition and so on, 3-5 electrodeposition shows low cost, high efficiency and no size or shape limit for the preparation of nano-scale films.However, it's not easy to control the growth and morphology of CoFe films accurately in the complex circumstances. The morphology and microstructure, which largely affect the magnetic properties of CoFe films, are often determined by the deposition conditions such as the pH value, 6 deposition potential, 7 addition agents 8 and so on. Moreover, the addition of the sulfur and boron containing surfactants was verified to contaminate the CoFe films, damaging the magnetic performance. 9 In recent years, magnetoelectrodeposition, 10 as an emerging interdisciplinary field, has received broad attention from a number of research groups. 11 It is known that magnetic field has remarkable influences on the movement of electroactive species, increasing the limiting current density 12 and causing the changes of the morphology 13-15 and composition 16 of the deposited films. The major effects of magnetic field on the electrodeposition process can be explained with magnetohydrodynamic (MHD) effect induced by Lorentz force ( F L = j × B, where j is thr current density in A m −2 , B is the applied field in tesla...