What would cause my 2001 honda accord to just die while driving?

I have changed the ignition switch and it still dies at random and I have to wait a few mins for it to chank up again. Sometimes when I hit the panic button on my remote and then unlock the car with the remote it will start up and run fine for a while then do it again.

I had a similar problem once. A baffle had come loose in the muffler and would sometimes block the exhaust and choke the engine. When the motor stopped the baffle would drop to the bottom until it bounced up again as I was driving and the exhaust pressure would hold it up, choking the engine again! Try tying a piece of stiff wire around the exhaust pipe with one end sticking a couple of inches into the muffler so it can't get blocked. If that works, buy a new muffler.

Hi yes a very worn out old engine does this eventually anyway. So this one has arrived at that point sooner than some do.

On a 14 year old car I would suspect the fuel filter may be partially clogged or the fuel pump is failing.