With its high calorific value and low energy consumption, hydrogen is an important component of a future low-carbon energy system. Hydrogen production from electrolyzed water is the main source of obtaining hydrogen. The slow kinetics of the oxygen evolution reaction (OER) involving a four-electron reaction in the process of water electrolysis leads to the inefficiency of hydrogen production from electrolyzed water, so the development of electrocatalysts with excellent OER is of great significance. Cobalt-based catalysts are promising for electrocatalytic OER in terms of performance and cost-effectiveness, and the degree of dispersion of Co sites determines the catalytic activity. Therefore, it is of great importance to prepare highly dispersed Co-site catalysts through a convenient method. Herein, we report the facile fabrication of Co single-atom catalysts (SACs) through the use of the confined space (between the silica wall and the template) in as-prepared mesoporous silica, template-occupied KIT-6 (TOK), with abundant Si–OH. The anchoring of metal in the form of Co–O–Si was achieved by the method of grinding and calcination. CoTOK shows excellent electrocatalytic activity and cycling stability relative to the counterpart catalysts CoTFK and Co3O4/TFK, being promising for applications. This synthetic approach is easy to scale up, and 10 g of sample can be effortlessly synthesized using ball milling, which provides a facile method for the large-scale preparation of SACs.