A modified polyimide has been created that both senses and absorbs moisture. The material was prepared by introducing cobalt(II) chloride, a well-known moisture sensing and absorbing metal salt, into a polyimide. The final polymer was found to be fully cured, retaining the metal without any leeching, and was thermally stable. Furthermore, the material underwent a visible color change when exposed to moisture and reverted back to the original color when subsequently dried. The total moisture absorbed was measured with a quartz crystal microbalance. The amount of moisture absorption was found to be proportional to the relative humidity, and the modified polymer was found to have up to 3 times greater moisture absorption compared to the unmodified polymer.