Rapid development of structural DNA nanotechnology has led to the emergence of precisely tailored nanostructures and molecular devices in different fields of research. Here we present a dynamic DNA origami nanocapsule for the encapsulation of various types of molecular cargo. The nanocapsule has a modular design that can be functionalized with a locking system responsive to a chosen environmental cue in biologically relevant conditions. We demonstrate that by introducing pH-sensitive DNA sequences in the structure, solution pH can be used to efficiently control the open/closed state of the capsule. In addition, the capsules can be loaded with cargo molecules, such as nanoparticles or enzymes. The capsules can thus be used to either shield or display the cargo in the selected pH environment, and be utilized in e.g. smart and controlled drug delivery applications.