In the last few years, magnetic tunnel junctions with MgO barrier have attracted attention due to the theoretically predicted and experimentally verified huge TMR. In the present work, crystallization behavior of CoFeB layer adjacent to the MgO or Ru layer was studied by annealing at various temperatures for 1 h. The crystallization started at MgO/CoFeB interface but crystallization temperature changed with materials and thickness of adjacent layer. When the thickness of MgO layer increased in MgO/CoFeB bilayer, crystallization temperature decreased. This strongly suggests that B from CoFeB layer diffused into adjacent layer to crystallize at lower temperature and MgO can serve as a sink of B. Details will be discussed.