It`s usually caused by hung process at shutdown.
Go into msconfig/start up and uncheck everything except anti virus and firewall.
If it shuts down Ok after that,then it was caused by one of the processes you unchecked.
Things known to prevent shutdown include spyware,anti spyware,nvidia driver helper.....
To end processes automatically at shutdown -
1. Open Regedit and navigate to HK_Users\.Default\Control Panel\Desktop
2. Double-click on AutoEndTasks
3. Change the value from 0 to 1
4. Reboot your machine
Now hung processes will end automatically when you try to shutdown or reboot your machine.
You should still try and locate the problem process,though.