Shutdown issues are mostly due to hanging applications that won't close. To enable you to find out which one, open Task Manager - Processes tab - Look for any unusual activity just before the system hangs.
I would suggest "killing off" processes that are running prior to shutting down.
Try ending the first 4 or 5 processes (making a note of which ones) and then shutdown.
If it still hangs, you didn't find it - if it doesn't hang, then you've found it.
Continue to do this with groups of 4 or 5 until you find the process that's causing it.
Maybe have a look in your Power Options (Control Panel) to see what the power buttons are set at.