Why my 99 honda accord dies after driving about 5 minutes

Does it everytime. It started suddenly out of the blue. Start it up if i leave town i get 3 or 4 miles out if ni stay in town i might get back home from post office if i hustle. Let it sit 10 or 15 minutes and it will start again for 4 or 5 mins. again. I have replaced the distributor the whole unit and replaced the ignition switch, both parts are new.

Check spark and fuel pressure.

If it works ok otherwise, like db4690 says above, it almost certainly must be either an ignition problem or a fuel problem. So the first step in the diagnosis is to eliminate one or the other as the cause.

I’m not sure if this can be done with fuel-injected cars like yours, but my early 70’'s Ford truck has had this symptom from time to time, and when it happens, I spray some starter fluid into the carb to see if it will start. If so, I know it’s a problem with the fuel. Usually on the truck it is the fuel inlet valve inside the carb that has stuck shut, which is simple to fix.

Do you know how to check for spark?

The problem might with the main fuel pump relay.

The relays of your vintage of Honda had a problem where the solder joints would crack. The relay would then be effected by the interior temperature of the vehicle where it would shut the fuel pump off. Then if you let the interior of the vehicle cool off the relay would function again.

The main fuel pump relay is located behind the dash, above the drivers side fuse box.

Tester

It could be any of those things^ so here’s one more:
Hondas of that vintage have a weakspot in the fuel pump relay.
http://www.tegger.com/hondafaq/mainrelayoperation/index.html

+1 for Tester. This problem is as common as dirt on Hondas.