"D'you think I don't know what people call me behind my back? Fat Myrtle! Ugly Myrtle! Miserable, moaning, moping Myrtle!"
-- Moaning Myrtle
Moaning Myrtle is a ghost who haunts a toilet in a girls’ bathroom on the second floor of Hogwarts castle. She is a squat ghost with lank hair, pimples, and thick glasses. She seldom smiles and takes offense at the least excuse, crying rivers of tears and wailing.
Myrtle, whose full name was Myrtle Elizabeth Warren, was a Ravenclaw (JKR) student at Hogwarts in 1943 when she was killed by the Basilisk from the Chamber of Secrets. She had been hiding in that bathroom because she was being teased by Olive Hornby, when she heard someone come in and heard that person speaking. She realized it was a boy, so she opened her stall to tell him to get out of the girls’ bathroom, only to find herself face to face with the Basilisk. (CS16). It was hours before anybody found her body (GF25). Her murder was used to create the Diary Horcrux (BLC).
After her death, Myrtle decided to haunt Olive Hornby to make her pay for teasing her, and followed Olive around until the Ministry had to step in and stop her (GF25). She then returned to the site of her death, a toilet, which she has haunted ever since, crying and splashing water whenever she feels the least bit miserable. Peeves in particular loves to pick on her and make her cry (CS8), and Ron seems particularly adept at causing offense (CS9).
Myrtle took quite a shine to Harry Potter, offering to share her toilet with him if he died (CS17) and spying on him when as he bathed in the prefects’ bathroom (GF25). She has been meeting Draco Malfoy, too, in the boys’ bathroom. Although she is a rather strange confidant, Draco complains to her that he’s lonely and people pick on him (HBP21, HBP24).
Moaning, wailing, flooding the girls' bathroom, haunting Olive Hornby, listening to Draco Malfoy
Other canon notes and references
— J.K. Rowling (@jk_rowling) May 11, 2015
The myrtle tree is a close relative of the willow tree. "Moaning Myrtle" is a similar phrase to "weeping willow." Her name is also possibly related to the "Moaning Minnie," the British name for a German WWII artillery shell that made a distinctive moaning whine before it hit.