I Had the Same Problem, and I Fixed It

I just want to tell anybody else who has this problem that there is at least one person who was able to fix it. My motherboard was not dying, I didn't have all of the other problems described in this thread. The only problem I had with my Dell OptiPlex GX520 small form factor was that it would not stay shutdown. When I shutdown the computer, either using the Windows commands or by the power button, the machine would shut off for only a few seconds and then power back on again. Everything else worked for this computer.

Here is what I did to fix it, in the following order. Note that I'm not sure exactly which step or combination of steps fixed the problem, so I'm listing them all.

1) I downloaded and ran the BIOS upgrade from Dell. I upgraded my BIOS from A01 to A11.
2) I went into the BIOS and I made sure that AC power recovery options were all turned off (they were).
3) I installed all of the device drivers from Dell. I don't think this made a difference, but who knows.
4) I shutdown the computer, and before the computer could turn back on again, I pulled the power plug. For me, there was always about a 2 second gap between the time that the computer shut down and before it would boot up again, so I had time to do this safely, in my opinion.
5) I pressed and held the power button with the power plug disconnected for several seconds to drain all of the capacitors.
6) I opened up the case and cleaned out all of the dust bunnies.
7) I disconnected the hard drive and removed the hard drive enclosure so I could easily get to the CMOS battery and jumpers.
8) I pulled the CMOS battery out.
9) I pulled out the PSWD jumper and then put it back in.
10) I replaced the CMOS battery.
11) I reinstalled the hard drive enclosure and reconnected the hard drive.
12) I put the cover back on the case.
13) I reconnected the power cable. Please note that when I did this the computer booted up automatically after 2 seconds, like it did before, but that this was the last time it did so.
14) I got an error message during boot up that complained about the time and date being reset. I pressed F2 to go into the BIOS.
15) I reset the clock, reconfigured all of my BIOS settings, and saved and exited the BIOS.
16) After my computer booted into Windows, I hit the "Start" button, then the "Turn Off My Computer" button, then the "Turn Off" button.

This time after the computer turned off, it stayed off! I hope this helps somebody else who is having the same problem.