The chemical reactions and pathways resulting in the formation of bacillithiol, the alpha-anomeric glycoside of L-cysteinyl-D-glucosamine with L-malic acid. Bacillithiol, produced widely in the Firmicutes and sporadically in other bacterial lineages, is a low-molecular-weight thiol analogous to mycothiol in the Actinomycetes and glutathione in many species.