Anthony Stallard and a friend were seen booting a soccer ball around in Kingston Cemetery and police went to investigate.
"While the football was going on they were shouting and this defendant was effectively singing loudly and being disrespectful in among the graves," prosecutor Tim Concannon said in the Portsmouth Magistrates' Court.
"He was throwing himself backwards, waving his arms about and going 'wooooooo'. I'm assuming he was pretending to be a ghost."
The 24-year-old was arrested and charged with using threatening or abusive words, or behavior likely to cause distress.
During his court appearance, Stallard, who is undergoing testing for autism, pleaded guilty.
Stallard was fined about $60 and ordered to pay an additional $67 in other costs. He also had three months added to an existing 12-month suspended sentence.
If Stallard gets in trouble in the next 15 months, he'll go to prison for 12 weeks.
Celebrity Couples of 2014 [PHOTOS]