Sounds like a driver or hardware problem somewhere. This can happen with things that are plugged into it.
Have got a auto login item to my NAS folders, could it be that? (have the same on my iMac and that shutsdown fine)
http://www.wired.com/gadgetlab/2013/10/mavericks-issues-and-fixes/?viewall=true
I've used the fix for stalled/slow shutdowns on this link on a number of machines and it has fixed it every time.