There is something special about a doornail. It's not a nail in the usual sense, but the stud on the outside of old doors (like a church door). In general usage, something is said to be dead if it is of no further use ("are these glasses dead"). Doornails are hammered through the door and clinched on the other side (i.e. hammered over to form a rivet). They are thus very definitely dead in the traditional sense.The phrase is old. It was used by Shakespeare, and appears in Piers Ploughman.
There is another common explanation of the phrase, but which seems to me to be less convincing. This is that the nail in question was the one securing the doorknocker, which would be dead to the constant assault.
Cheers!
Ian