In this experiment, Maxwell imagined two glass compartments connected by a thin tunnel. In the middle of the tunnel is a tiny door. In each compartment was a volume of room-temperature air. Sitting atop the tunnel was a "Demon," who, by exercising his powers of observation, could tell when a hot (faster) molecule was approaching the door from the right compartment. Seeing it approach, the demon would open the door to let the hot molecule pass. Similarly, seeing a cold (slower-moving) molecule approach from the left, he would let that pass through to the right hand compartment. Soon, simply by exercising his powers of observation, the Demon had created a heat differential where there was none before, countermanding Maxwell's own Second Law.
There have been several brilliant refutations of Maxwell's Demon. Leo Szilard in 1929 suggested that the Demon had to process information in order to make his decisions, and suggested, in order to preserve the first and second laws (of conservation of energy and of entropy) that the energy requirement for processing this information was always greater than the energy stored up by sorting the molecules.
It was this observation that inspired Shannon to posit his formulation that all transmissions of information require a phsyical channel, and later to equate (along with his co-worker Warren Weaver, and in parallel to Norbert Wiener) the entropy of energy with a certain amount of information (negentropy).
Part of Wiener's motivation in embracing this mathematical formulation of negentropy = information was to find a refutation of the Heisenberg Uncertainty Principle. The Heisenberg situation introduced the human mind and the information it had about the position of an electron in its orbit around a nucleus onto the stage of physics. Heisenberg showed that one could not know the position of the electron outside a range of probability. Observing the electron "collapses" the wave of probabilities.
The expense of this weird scenario to an ideal of science as objective and certain was intolerable, not only to Wiener but to Einstein (who quipped in response that he "could not be persuaded that G-d plays dice with the universe"). Today, even though it is one of the most successful theories in the history of physics, the Heisenberg Uncertainty Principle remains difficult to grasp, problematic for rationality, and counter-intuitive. Furthermore, none of the hypotheses concocted to preserve a more classical idea of phsyics seems very satisfactory either (like the Many Worlds Hypothesis).
At the time, a mathematic specification of information in terms of energy
seemed to Wiener to promise a cure to this infection of science by subjective
observation and "mentalism" (the mind of the observer).
Along the way, though, creating a way of handling information mathematically also gave birth to the information age and paved the way for the modern computer.