Took part in court and behaved badly (5,2)
I believe the answer is:
acted up
'behaved badly' is the definition.
(acting up is a kind of behaving badly)
'took part in court' is the wordplay.
'took part' becomes 'acted' (as in an actor taking a part in a production).
'in court' becomes 'up' (up before a judge).
'acted'+'up'='ACTED UP'
'and' acts as a link.
(Other definitions for acted up that I've seen before include "Behaved badly" , "carried on" .)