Detective hanging around 'Yard' causes confusion (8)
I believe the answer is:
disarray
'confusion' is the definition.
('disarray' can be a synonym of 'confusion')
'detective hanging around yard' is the wordplay.
'detective' becomes 'di' (Detective Inspector abbreviation).
'hanging' becomes 'arras' (arras is a kind of hanging).
'around' says the letters should be written backwards.
'yard' becomes 'y'.
'arras' written backwards gives 'sarra'.
'di'+'sarra'+'y'='DISARRAY'
'causes' is the link.
(Other definitions for disarray that I've seen before include "Disorganised state" , "Untidy state" , "Clutter and disorder" , "chaos" , "confusion?" .)