It may be the top to a vintage baby rattle. I found one a few years back, and it was ID here on TNet as a baby rattle. I found all 3 pieces in the same hole, which was half of the ball, the handle, and one of the rattles. The handle is upside down in the pic.
Its some sort of fennal or end piece to something...Im sure the black powder was probally just dirt....It probally cast pot metal, which is why it wont stick to a magnet