A general strategy to prepare atomically dispersed transition metals in a β-cyclodextrin polymer with similar structure and function as enzymes.