Google’s John Mueller said in a Google Webmaster Help thread said that if you have bad or spammy links pointing to 404 pages, it should have no negative impact on your overall site’s rankings.
John said not only should it not happen, he has never seen it happen. He said:
What if you do find a case? Then John says, let him know.
That said, if you ever feel that you’ve run across a case where it is really causing a problem, I’d love to take a look at the details. Feel free to send me a note directly on my Google+ profile ( http://johnmu.com/+ ) with the details that you’ve found. In this particular case (assuming you mean the site mentioned in the original post), those 404s are really not having any negative effect, and any changes in ranking that you’re seeing definitely have other causes.
I don’t get why a link to a dead URL would have any positive or negative impact anyway, but I guess anything is possible.
Forum discussion at Google Webmaster Help.
Image credit to ShutterStock.