The present invention relates to a composition for dyeing human keratin fibres such as the hair, in mousse form, comprising: (a) at least one oxidation dye precursor; (b) at least one amphoteric or zwitterionic surfactant; (c) at least a second surfactant chosen from nonionic and anionic surfactants, or mixtures thereof; (d) at least one fatty substance; (e) at least one nonionic guar gum. The invention also relates to a process for dyeing human keratin fibres, in which is applied a composition preferably in foam form, obtained by mixing the above mentioned composition, free of oxidizing agent other than atmospheric oxygen, with a composition comprising at least one oxidizing agent other than atmospheric oxygen, and also to a suitable multi-compartment device.