This question already has an answer here:

At several points, ghosts are shown to be under the ministry’s control. But ghosts seem to care little about the law, and I doubt peeves would do it out of obedience. How does the ministry control ghosts? I am not asking how ghosts are punished, I am asking why ghosts are so easily controlled and ordered about, why don’t they refuse or run of? I repeat my earlier statement.

marked as duplicate by Valorum harry-potter Aug 27 at 16:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Peeves isn't strictly speaking a ghost. – Valorum Aug 27 at 7:19
  • 2
    "At several points, ghosts are shown to be under the ministry’s control." - Are they? Which points? I don't recall that. – Rand al'Thor Aug 27 at 8:05
  • 1
    @Randal'Thor, there's the bit about Moaning Myrtle referenced in the first proposed duplicate. Can't recall anything else though. – Harry Johnston Aug 27 at 8:10
  • 1
    Moaning myrtle said the ministry made her stay at Hogwarts. – Samalot Aug 27 at 8:21
  • 1
    @moonCat93 Haunting Olive was the reason she became a ghost, and she would have stayed at Hogwarts to do that while Olive was at Hogwarts. However, Myrtle continued haunting her even after she'd left school, and the Ministry forced her to stop that and return to Hogwarts. – Anthony Grist Aug 27 at 21:49

Browse other questions tagged or ask your own question.