Not all systems have the property that the entropy increases monotonically with energy. In some cases, as energy is added to the system, the number of available microstates, or configurations, actually decreases for some range of energies. For example, imagine an ideal "spin-system", a set of N atoms with spin 1/2 on a one-dimensional wire. The atoms are not free to move from their positions on the wire. The only degree of freedom allowed to them is spin-flip: the spin of a given atom can point up or down. The total energy of the system, in a magnetic field of strength B, pointing down, is (N+ - N-)*uB, where u is the magnetic moment of each atom and N+ and N- are the number of atoms with spin up and down respectively. Notice that with this definition, E is zero when half of the spins are up and half are down. It is negative when the majority are down and positive when the majority are up.
The lowest possible energy state, all the spins pointing down, gives the system a total energy of -NuB, and temperature of absolute zero. There is only one configuration of the system at this energy, i.e., all the spins must point down. The entropy is the log of the number of microstates, so in this case is log(1) = 0. If we now add a quantum of energy, size uB, to the system, one spin is allowed to flip up. There are N possibilities, so the entropy is log(N). If we add another quantum of energy, there are a total of N(N-1)/2 allowable configurations with two spins up. The entropy is increasing quickly, and the temperature is rising as well.
However, for this system, the entropy does not go on increasing forever. There is a maximum energy, +NuB, with all spins up. At this maximal energy, there is again only one microstate, and the entropy is again zero. If we remove one quantum of energy from the system, we allow one spin down. At this energy there are N available microstates. The entropy goes on increasing as the energy is lowered. In fact the maximal entropy occurs for total energy zero, i.e., half of the spins up, half down.
So we have created a system where, as we add more and more energy, temperature starts off positive, approaches positive infinity as maximum entropy is approached, with half of all spins up. After that, the temperature becomes negative infinite, coming down in magnitude toward zero, but always negative, as the energy increases toward maximum. When the system has negative temperature, it is hotter than when it is has positive temperature. If you take two copies of the system, one with positive and one with negative temperature, and put them in thermal contact, heat will flow from the negative-temperature system into the positive-temperature system.