Absolute humidity is the measure of the amount of water vapor in a given volume of air. As air heats or cools the amount of water vapor remains the same, so the absolute humidity remains the same, although relative humidity (the amount present compared to how much is theoretically possible) will go down as air heats and up as it cools. However, if the air rises and cools so much that some of the water vapor reaches its condensation point and forms liquid water, then the absolute humidity would fall since the amount of vapor would begin to decrease.
The change in absolute humidity change as a parcel of air with an unchanging amount or water vapor rises, expands, and cools is attributed to condensation. Condensation releases latent heat. As a result of this, when the parcel rises, it naturally cools and expands as the pressure is lowered.