A cartridge for an aerosol-generating system may include a first chamber housing defining a first chamber and a second chamber housing defining a second chamber that is separate from the first chamber. The first chamber may contain an aerosol-forming substrate in the form of a gel, and the second chamber may contain a source of a desired compound. The first and second chamber housings may be separate or separable structures.