For a nitrogen dimer in insulating MgO, a ferromagnetic coupling between spin-polarized 2p holes is revealed by calculations based on the density functional theory amended by an on-site Coulomb interaction and corroborated by the Hubbard model. It is shown that the ferromagnetic coupling is facilitated by a T-shaped orbital arrangement of the 2p holes, which is in its turn controlled by an intersite Coulomb interaction due to the directionality of the p orbitals. We thus conjecture that this interaction is an important ingredient of ferromagnetism in band insulators with 2p dopants.