Hollow periodic mesoporous organosilica spheres (HPMOs) have stimulated great research interest owing to its unique organic–inorganic hybrid skeleton. In this work, HPMOs were synthesized by hydrothermal method, and then cobalt and nitrogen co-doped carbon catalyst was prepared by using HPMOs as supports. The optimal catalyst (Co-Nx/HPMOs-D) performed excellent activity in the selective oxidation reaction of aryl alkanes, with the conversion of ethylbenzene up to 97.0% and the selectivity of acetophenone was 98.9%, which was attributed to the Co-Nx active species and the unique HPMOs supports. The unique amphiphilic property of Co-Nx/HPMOs-D could better facilitate the adsorption and diffusion of organic substrates in the aqueous phase. The addition of dicyandiamide not only enhanced the nitrogen content in the catalyst, but also promoted the conversion of pyrrolic-N to pyridinic-N during the pyrolysis process, thus strengthened the interaction between the substrate and cobalt and improved the stability of the catalyst. This work presented a green and environmentally friendly method for the preparation of HPMOs and a facile strategy to obtain high performance catalysts for selective oxidation of aryl alkanes.