Watch for the octopus leg poking out of the barrel, then drag the octopus onto the boss's head as soon as it appears.
Timing is everything here — the window is short, so have your cursor ready rather than hunting for the item after it shows up.