How can the tooth hurt if the nerve is gone?

Your tooth is still alive on the outside. The pain comes from infection and/or inflammation in the bone along the outside of the tooth. Medication will control this; time will heal it.