Recently, a magnetically induced ferroelectricity occurring at magnetic domain wall of double perovskite Lu2CoMnO6 has been reported experimentally. However, there exists a conflict whether the electric polarization is along b or c direction. Here, by first-principles calculations, we show that the magnetic domain wall (with up arrow up arrow down arrow down arrow spin configuration) can lead to the ferroelectric displacements of R3+, Ni2+, Mn4+, and O2- ions in double perovskites R2NiMnO6 (R = rare earth ion) via exchange striction. The resulted electric polarization is along b direction with the P2(1) symmetry. We further reveal the origin of the ferroelectric displacements as that: (1) on a structural point of view, such displacements make the two out-of-plane Ni-O-Mn bond angles as well as Ni-Mn distance unequal, and (2) on an energy point of view, such displacements weaken the out-of-plane Ni-Mn super-exchange interaction obviously. Finally, our calculations show that such a kind of ferroelectric order is general in ferromagnetic double perovskites. (c) 2015 AIP Publishing LLC.