The domain pinning mechanism was investigated in nanometer hard magnetic materials. The pinning fields of domain wall at different inhomogeneities were studied respectively. And exchange-coupling coefficient αex was investigated too. The results showed that αex is proportional to the ratio of inhomogeneity thickness ro to wall width δm for narrow inhomogeneity, while it decreases with enhancement of ro/δm for extended inhomogeneity. At a certain value of ro, exchange-coupling coefficient and pinning fields will reach the maximum. Exchange-coupling interaction and pinning fields are greatly influenced by inhomogeneity. Control range of inhomogeneity may obtain higher coercivity.