Interfaces in the MgO-FeCoB-MgO trilayer have been studied with grazing incident nuclear resonance scattering (GINRS) using the x-ray standing waves (XSW) technique. High depth selectivity of the present method allows one to measure magnetism and structure at the two interfaces of FeCoB, namely, FeCoB-on-MgO and MgO-on-FeCoB, independently, yielding an intriguing result that both interfaces are not symmetric. A high-density layer with an increased magnetic hyperfine field at the FeCoB-on-MgO interface suggests different growth mechanisms at the two interfaces. The azimuthal angle-dependent magneto-optic Kerr effect measurements reveal the presence of unusual uniaxial magnetic anisotropy (UMA) in the trilayer. An in-situ temperature-dependent study discovered that this UMA systematically reduces with temperature. The trilayer becomes isotropic at 450C with an order-of-magnitude increase in coercivity. The asymmetry at the interfaces is, in turn, explained by boron diffusion from the FeCoB interface layer into the nearby MgO layer. Stress-induced UMA is observed in the boron-deficient FeCoB layer, superimposed with the bulk FeCoB layer, and found to be responsible for unusual UMA. The temperature-dependent variation in the UMA and coercivity can be understood in terms of variations in the internal stresses and coupling between FeCoB bulk and the interface layer.