Single-molecule studies can reveal phenomena that remain hidden in ensemble measurements. Here, we show the correlation between lateral protein diffusion and channel activity of the general protein import pore of mitochondria (TOM-CC) in membranes resting on ultrathin hydrogel films. Using electrode-free optical recordings of ion flux, we find that TOM-CC switches reversibly between three states of ion permeability associated with protein diffusion. Freely diffusing TOM-CC molecules are observed in a high permeability state, while non-moving molecules are in an intermediate and a low permeability state. We explain this behavior by the mechanical binding of the two protruding Tom22 subunits to the hydrogel and a concomitant combinatorial opening and closing of the two β-barrel pores of TOM-CC. TOM-CC could thus be the first β-barrel protein channel to exhibit membrane state-dependent mechanosensitive properties.