As a lexical verb, "have" requires the help of "did" to form a negative or a question. "Did" is a kind of auxiliary verb, so the main verb (such as "have") that follows it is always in the plain (infinitive) form:
I have nothing to worry about. (positive) Idid not/didn't have anything to worry about. (negative) Did I have anything to worry about? (question)