We present a microscopic model for the anisotropic exchange interactions in Sr2IrO4. A direct construction of Wannier functions from first-principles calculations proves the j(eff)=1/2 character of the spin-orbit integrated states at the Fermi level. An effective j(eff)-spin Hamiltonian explains the observed weak ferromagnetism and anisotropy of antiferromagnetically ordered magnetic state, which arise naturally from the j(eff)=1/2 state with a rotation of IrO6 octahedra. It is suggested that Sr2IrO4 is a unique class of materials with effective exchange interactions in the spin-orbital Hilbert space.