Anthony Stallard pleaded guilty at Portsmouth magistrates court to using threatening or abusive words or behaviour likely to cause distress.
The court heard that the 24-year-old had been out drinking with friends when they went to Kingston cemetery in Portsmouth, where they started to play football.
A Hampshire police spokesman said that witnesses complained to police about Stallard's rowdy behaviour and his pretending to be a ghost.
"The witnesses reported the group engaging in rowdy behaviour and one of them throwing their arms in the air and saying 'woooooo'," he said.
Sounds like it was more about being a public nuisance. It's a cemetery, have some respect for those who are there grieving.