The diversity of the genetic code systems used by microbes on earth is yet to be elucidated. It is known that certain methanogenic archaea employ an alternative system for cysteine (Cys) biosynthesis and encoding; tRNACys is first acylated with phosphoserine (Sep) by O-phosphoseryl-tRNA synthetase (SepRS) and then converted to Cys-tRNACys by Sep-tRNA:Cys-tRNA synthase (SepCysS). In this study, we searched all genomic and metagenomic protein sequence data in the Integrated Microbial Genomes (IMG) system and at the NCBI to reveal new clades of SepRS and SepCysS proteins belonging to diverse archaea in the four major groups (DPANN, Euryarchaeota, TACK, and Asgard) and two groups of bacteria ("Candidatus Parcubacteria" and Chloroflexi). Bacterial SepRS and SepCysS charged bacterial tRNACys species with cysteine in vitro Homologs of SepCysE, a scaffold protein facilitating SepRS⋅SepCysS complex assembly in Euryarchaeota class I methanogens, are found in a few groups of TACK and Asgard archaea, whereas the C-terminally truncated homologs exist fused or genetically coupled with diverse SepCysS species. Investigation of the selenocysteine (Sec)- and pyrrolysine (Pyl)-utilizing traits in SepRS-utilizing archaea and bacteria revealed that the archaea carrying full-length SepCysE employ Sec and that SepRS is often found in Pyl-utilizing archaea and Chloroflexi bacteria. We discuss possible contributions of the SepRS-SepCysS system for sulfur assimilation, methanogenesis, and other metabolic processes requiring large amounts of iron-sulfur enzymes or Pyl-containing enzymes.IMPORTANCE Comprehensive analyses of all genomic and metagenomic protein sequence data in public databases revealed the distribution and evolution of an alternative cysteine-encoding system in diverse archaea and bacteria. The finding that the SepRS-SepCysS-SepCysE- and the selenocysteine-encoding systems are shared by the Euryarchaeota class I methanogens, the Crenarchaeota AK8/W8A-19 group, and an Asgard archaeon suggests that ancient archaea may have used both systems. In contrast, bacteria may have obtained the SepRS-SepCysS system from archaea. The SepRS-SepCysS system sometimes coexists with a pyrrolysine-encoding system in both archaea and bacteria. Our results provide additional bioinformatic evidence for the contribution of the SepRS-SepCysS system for sulfur assimilation and diverse metabolisms which require vast amounts of iron-sulfur enzymes and proteins. Among these biological activities, methanogenesis, methylamine metabolism, and organohalide respiration may have local and global effects on earth. Taken together, uncultured bacteria and archaea provide an expanded record of the evolution of the genetic code.