Thioester synthesis by CO dehydrogenase/acetyl-CoA synthase is among the most ancient autotrophic metabolisms. Although the preceding prebiotic CO2 fixation routes to thioesters are often suggested, none has any experimentally supported evidence. Here we demonstrate that, under an electrochemical condition realizable in early ocean hydrothermal systems, nickel sulfide (NiS) gradually reduces to Ni0, while accumulating surface-bound CO due to CO2 electroreduction. The resultant partially reduced NiS facilitates thioester (S-methyl thioacetate) formation from CO and methanethiol even at room temperature and neutral pH. This thioester formation can further be enhanced up to a selectivity of 56% by NiS coprecipitating with FeS or CoS. Considering the central role of Ni in the enzymatic process mentioned above, our demonstrated thioester synthesis with the partially reduced NiS could have a direct implication to the autotrophic origin of life.