If it's an electronic (analog) speedometer needle, you probably have a problem with the dasboard grounding.
I would suspect a faulty VSS. Try replacing the vehicle speed sensor in the transmission.
sounds like a broken speedometer cable.
If the speedometer needle on a 2001 Honda Accord is going below the 0 mark and jumping the black stop needle, it may indicate a problem with the speedometer mechanism or the vehicle's speed sensor. This could be due to a faulty speed sensor, a malfunctioning speedometer gauge, or wiring issues. In some cases, the instrument cluster itself may need repair or replacement. It's advisable to have the vehicle inspected by a professional to diagnose and fix the issue.
Bad ground on the brake lite circuit.
So the speed gauge in the dash and the speedometer cable have been replaced. Well, the only thing left to my knowledge would be the geared speed sensor in the transaxle. I have the same problem. Replaced the speedometer cable but to no avail. I then took the speedometer out and used an electric motor to drive it on my bench and noticed that the part that is driving the needle (driven by a magnet) starts vibrating at certain speeds. On further investigation I found that the bush on the panel that the spindle goes through ( just behind the needle) is worn and hence the spindle/shaft does not run tight and starts vibrating/rattling and then it sometimes swing up and down. When I lightly touch the needle it stabilizes for a while and then starts vibrating again. The needle is not driven directly, but through a magnetic coupling so the slightest interference can cause problems. It seems the only solution is to replace the speedometer. Unfortunately you have to replace the whole cluster. I thought I could do something about the bush, but it is too delicate and you will have to remove the little coil spring which means the speedometer will have to be re-calibrated.
The gears in the speedometer are stripped. If the odometer is working then you have input.
TCM Malfunction, And/Or Speedometer Sensor Malfunction.
When they are not displayed - check to see if the headlights are on - they are designed to dim and perhaps the dimmer control just needs to be adjusted
Alternator
i would have to bet on the speed sensor
YES ! ! ! next you know you will be stranded trying to get a jumper it doesnt work until you replace either alternator and battery[both].
Possible ground issue at the taillights.