The invention belongs to the field of daily cosmetics, and discloses a composition containing a bacillus fermentation product and shampoo containing the composition. The composition comprises the bacillus fermentation product, dichlorobenzyl alcohol and salicylate, and through the synergistic effect of the bacillus fermentation product, dichlorobenzyl alcohol and salicylate, the composition can effectively inhibit bacteria and remove dandruff, is mild to scalp, and can relieve the scalp. According to the shampoo containing the composition, by reasonably matching a surfactant, a fat-imparting agent, a conditioner, a dandruff removing effect substance, an oil control effect substance and a relieving effect substance, the shampoo has good effects of removing dandruff, controlling oil and relieving the scalp, can reduce the burden of the scalp, maintain the ecological balance of the scalp, avoid the secretion of a large amount of grease, and is suitable for long-term use; and meanwhile, the shampoo has rich foam, excellent dry and wet combing properties and good overall use feeling.