The development of nanocarriers that selectively release guest molecules on sensing a particular biological signal is being actively pursued in nanomedicine for diagnostic and therapeutic purposes. Here we report a protein-based nanocarrier that opens in the presence of intracellular adenosine-5'-triphosphate (ATP). The nanocarrier consists of multiple barrel-shaped chaperonin units assembled through coordination with Mg(2+) into a tubular structure that protects guest molecules against biological degradation. When its surface is functionalized with a boronic acid derivative, the nanocarrier is able to enter cells. The hydrolysis of intracellular ATP into adenosine-5'-diphosphate (ADP) induces conformational changes of the chaperonin units, which in turns generate a mechanical force that leads to the disassembly of the tube and release of the guests. This scission occurs with a sigmoidal dependence on ATP concentration, which means that the nanocarrier can differentiate biological environments in terms of the concentration of ATP for selective guest release. Furthermore, biodistribution tests reveal preferential accumulation of the nanocarriers in a tumour tissue.