If the gas molecules were so close together that moving apart would give them a lower potential energy, then the molecules repel each other. Expansion lowers the intermolecular potential energy. This means that expansion releases energy from the intermolecular potential, and that energy is picked up by the molecules' kinetic energy. In other words, the gas molecules speed up and the temperature increases. If the gas molecules were feeling lonely before expending, that is, if moving apart gives the gas molecules higher potential energy, then the gas molecules attract each other.
Expansion raises the intermolecular potential energy, lowering the molecules' kinetic energy.
The molecules slow down and the temperature decreases. Upon expansion, the gas cools. That means that the gas molecules are attracted to each other. Argonne National Laboratory, Division of Educational Programs, Harold Myron, Ph.D., Division Director.