The mutation responsible for HbS is a single nucleotide substitution, where adenine is replaced by thymine at the sixth codon of the beta-globin gene. This changes the codon from GAG (glutamic acid) to GTG (valine), resulting in the synthesis of hemoglobin with valine instead of glutamic acid at the sixth position of the beta chain.