Harry sneaks out late at night to go to the prefects' bathroom with his egg.
He takes his Invisibility Cloak and the Marauder's Map.
The Marauder's Map is a magical map of Hogwarts that shows all of its secret passages – and also shows whenever anyone is coming.
[It was made by Harry's father and his three friends, Sirius Black, Remus Lupin, and Peter Pettigrew (traitor!), when they were at Hogwarts. It first appears in Harry Potter and the Prisoner of Azkaban.]
The prefects' bathroom is pretty swanky.
But even if Harry is about to enjoy a very fancy bath, he still can't figure out what this has to do with his egg.
As he thinks it over, he hears a voice: "I'd try putting it in the water, if I were you" (25.11).
It's Moaning Myrtle!
(Moaning Myrtle is the ghost of a student killed by a giant basilisk many years before; she has the great misfortune of haunting Hogwarts' toilets. She appears in Harry Potter and the Chamber of Secrets.)
Moaning Myrtle is feeling rather lonely, and she wants to see more of Harry.
Harry is brutally embarrassed – he's naked, for Pete's sake.
But, anyway, he takes the egg, puts it underwater, holds his breath, and sticks his head into the bath.
The egg starts to sing a poem: "Come seek us where our voices sound" (25.28).
Harry works out that the second task is going to involve merpeople and "what [he'll] sorely miss" (25.28).
But now Harry has to figure out how to breathe under the water of the Hogwarts lake.
Harry takes his Invisibility Cloak and goes back to bed.
He looks at the Marauder's Map and sees someone that definitely isn't supposed to be there: Mr. Crouch.
Harry decides to go and "see what Crouch [is] up to" (25.62).
But, because Harry isn't concentrating, he accidentally steps on a trick stair that makes his foot sink into the staircase.
He trips and drops the golden egg and the Marauder's Map.
The golden egg breaks open and starts to shriek. So much for being invisible.
Argus Filch, the caretaker, assumes that this is Peeves the Poltergeist's fault.
He comes climbing up the stairs, but before Filch finds Harry, Professor Snape comes along.
The situation is going from bad to worse.
Professor Snape is out investigating a break-in to his office. His office has been sealed, and no poltergeist could get in.
Filch and Professor Snape start arguing about what's more important: Peeves, or Snape's office.
And then, Mad-Eye Moody appears too! (Who knew that the Hogwarts hallways were such a social gathering place?)
Moody can see Harry through his Invisibility Cloak, of course.
And Moody has overheard that someone broke into Professor Snape's office.
Moody thinks Professor Snape is hiding something in his office.
Professor Snape answers, "Dumbledore happens to trust me" (25.110).
But he turns to go.
That is, until Moody picks up the Marauder's Map and offers it to Professor Snape, thinking that he dropped up.
Harry waves anxiously, mouthing, "It's mine! Mine!" (25.116).
Moody quickly takes the map back, saying "My mistake [...] It's mine – must've dropped it earlier —" (25.120).
But, of course, because Harry's luck can be pretty bad, Professor Snape recognizes the parchment right away.
Professor Snape knows that Harry is nearby in his Invisibility Cloak.
So Moody and Professor Snape get into a staring contest.
Moody intimidates Professor Snape into going away.
Once Filch and Professor Snape have left, Harry explains the Marauder's Map to Moody.
Harry also mentions that he saw Mr. Crouch on the map.
Moody seems struck by this, but he won't explain why. He says only: "Put it this way, Potter [...] they say old Mad-Eye's obsessed with catching Dark wizards ... but I'm nothing – nothing – compared to Barty Crouch" (25.156).
Moody also adds: "Oh, if there's one thing I hate, [...] it's a Death Eater who walked free ..." (25.164).
Moody wants to borrow the map – it would be very useful.
Harry would prefer to hang onto his prized possession, but he does owe Moody a favor.
Moody thanks Harry and suggests that he consider a career as an Auror – he'd be good at it.
Harry falls asleep wisely thinking, "he thought he'd like to check how scarred the rest of [the Aurors] were before he chose it as a career" (25.181).