If you are trying to say that a living thing is in the process of no longer living, "dying" is the correct spelling. The word dying is used to indicate that something will cease to exist.