I accidentally put the non-USB end of my phone charger in a front USB port and my PC shut down instantly. It's working fine now except it freezes on the "Shutting down" screen and will only turn off via the power switch or unplugging it from the mains.
I have made the me mistake of putting a USB cable in my RJ45 and having my machine instantly shut down being they are side by side. So I feel you there. However, I do not believe one is the cause of the other.
Try cleaning out all temp folders (C:\Windows\Temp and C:\Users\<Profile>\AppData\Local\Temp) and see how that goes. If you still have the issue I would start investigating what programs are running that are causing it. You can either start killing processes, or go to msconfig and stop them all or you can try event viewer and monitor which applications are taking a long time to respond.