What's going on is the usual process by which good quotes get detached from their original authors and grafted onto celebrities (Napoleon in this case). It helps the quote propagate faster. The internet seems to accelerate this process - or maybe it's that it makes it visible because original sources are easier to track down than they used to be. In any case, it's a fun little mini-hobby to follow these things. For example, Gandhi never said the one about "first they laugh at you", Einstein never said the one about insanity being doing the same thing over and over, etc.
I've never seen the insanity one attributed to Einstein; usually people say it comes from AA. Personally, that one always drove me nuts because, while I appreciate the sentiment, the way it is phrased is blatantly wrong. I eventually came up with a suitable response: whenever someone quotes that one to me, I pull out a coin and start flipping it repeatedly, calling out "heads" or "tails" each time.
Amusing, many people get it "wrong" and I don't even know which is the original between the two of "The definition of insanity is doing the same thing over and over again and expecting a (different/same) result."; to me both are equally wrong and useless. In a world that is always adapting, doing the same thing over and over again will often locally have the same effect but globally it won't as conditions change, and the aphorism is basically never actually useful or as wise as it sounds.