Imaginary numbers play an important role in physics, especially in quantum physics. They are not only a part of describing the dynamic behavior of quantum systems, but also play a key role in the phase and interference phenomena of quantum states. Similar to coherence and entanglement, the imaginarity has been regarded as a quantum resource, further revealing the nonclassical properties of quantum systems and providing new research directions and applications for fields such as quantum computing and quantum communication. In our work, we mainly explore the quantitative relationship between imaginarity and entanglement. For an arbitrary quantum state, there exists a general quantitative relationship between imaginarity and entanglement. For a given class of quantum states, where the closest real states to them are diagonal states, there exists an imaginarity-entanglement inequality. We demonstrate that for these quantum states, any degree of imaginarity with respect to some reference basis can be transformed into entanglement through incoherent real operations. This discovery allows us to define an entanglement-based imaginarity quantifier for these states in quantum systems of arbitrary dimensions and to study their properties. It is shown that for these quantum states, imaginarity and entanglement are operationally equivalent. Our work provides a clear quantitative and operational link between imaginarity and entanglement.