Most enzyme studies are carried out in bulk aqueous solution, at the so-called ensemble level, but more recently studies have appeared in which enzyme activity is measured at the level of a single molecule, revealing previously unseen properties. To this end, enzymes have been chemically or physically anchored to a surface, which is often disadvantageous because it may lead to denaturation. In a natural environment, enzymes are present in a confined reaction space, which inspired us to develop a generic method to carry out single-enzyme experiments in the restricted spatial environment of a virus capsid. We report here the incorporation of individual horseradish peroxidase enzymes in the inner cavity of a virus, and describe single-molecule studies on their enzymatic behaviour. These show that the virus capsid is permeable for substrate and product and that this permeability can be altered by changing pH.