Review this link:
http://www.theeldergeek.com/shutdown_issues_in_xp.htm

Also make sure your PC is free of parasites, spyware and you are not running a P2P network such as Kazaa, Imesh etc.

Scan with Ad-Aware 6.0, SpyBot Search & Destroy, Stinger.exe. They can be downloaded free. Search for them on Google.

If this just started happening you can also try system restore back to when it worked.