An efficient strategy to drive nanoparticles into carbon nanotubes and the remarkable effect of confinement on their catalytic performance.