Before the final vote for electing the 998th Lord Commander the brothers who bring the kettle over open the lid and Mormont's raven comes flying out and lands on Jon.
The kettle was in the corner by the hearth, a big black potbellied thing with two huge handles and a heavy lid. Maester Aemon said a word to Sam and Clydas and they went and grabbed the handles and dragged the kettle over to the table. A few of the brothers were already queueing up by the token barrels as Clydas took the lid off and almost dropped it on his foot. With a raucous scream and a clap of wings, a huge raven burst out of the kettle. It flapped upward, seeking the rafters perhaps, or a window to make its escape, but there were no rafters in the vault, nor windows either. The raven was trapped. Cawing loudly, it circled the hall, once, twice, three times. And Jon heard Samwell Tarly shout, "I know that bird! That's Lord Mormont's raven!"
The raven landed on the table nearest Jon. "Snow," it cawed. It was an old bird, dirty and bedraggled. "Snow," it said again, "Snow, snow, snow." It walked to the end of the table, spread its wings again, and flew to Jon's shoulder.
A Storm of Swords, Jon XII
Who put the raven there? I can think of three example but none seem particuarly convincing so far.
1. Samwell Tarly
He seems to be the most plausible example but when questioned about it he denies it, of course he could be lying though. In the quote Pyp and Green seem to think Sam did it too though so they seem to be out as possible candidates.
The king's men cleared the door when they told them of the choosing, and Three-Finger Hobb and half a dozen helpers went trotting off to the kitchen to fetch the food. Jon did not wait to eat. He walked across the castle, wondering if he were dreaming, with the raven on his shoulder and Ghost at his heels. Pyp, Grenn, and Sam trailed after him, chattering, but he hardly heard a word until Grenn whispered, "Sam did it," and Pyp said, "Sam did it!" Pyp had brought a wineskin with him, and he took a long drink and chanted, "Sam, Sam, Sam the wizard, Sam the wonder, Sam Sam the marvel man, he did it. But when did you hide the raven in the kettle, Sam, and how in seven hells could you be certain it would fly to Jon? It would have mucked up everything if the bird had decided to perch on Janos Slynt's fat head."
"I had nothing to do with the bird," Sam insisted. "When it flew out of the kettle I almost wet myself."
A Storm of Swords, Jon XII
2. Maester Aemon
When Sam questions the maester over potentially favouring Jon he seems to deny that he would do anything of the sort though looking at his words he could have worked in the background i.e. put the raven in without anyone seeing him.
"The choosing . . . Maester, isn't there something you could do? What the king said of Lord Janos . . ."
"I recall," Maester Aemon said, "but Sam, I am a maester, chained and sworn. My duty is to counsel the Lord Commander, whoever he might be. It would not be proper for me to be seen to favor one contender over another."
"I'm not a maester," said Sam. "Could I do something?"
Aemon turned his blind white eyes toward Sam's face, and smiled softy. "Why, I don't know, Samwell. Could you?"
A Storm of Swords, Samwell V
3. Bloodraven
This seems to be a fan favourite that Bloodraven was controlling Mormont's raven, possibly for longer than just the kettle scenario. This reddit post goes into a lot of detail over the quotes so I won't repeat it here. The one problem with this theory though is that someone had to put the lid back on the kettle so he must have had an accomplice anyway.
So who put Mormont's raven into the kettle?