The behaviours of micro-organisms at interfaces play important roles in various biological, medical and engineering phenomena. Despite its widely recognized importance, our understanding of swimming micro-organisms at interfaces is limited. Ferracci et al. (PLoS One, vol. 8, 2013, e75238) reported that the ciliate, Tetrahymena, was entrapped at a water–air interface, while it escaped from a solid wall. Although the entrapment was speculated to be induced by physical processes, the mechanism is still unclear. To clarify the entrapment phenomenon, we focus on cell shape and numerically investigate the behaviour of a swimming micro-organism at interfaces from a hydrodynamic point of view. The model cell is assumed to propel itself by generating homogeneous tangential stress above the cell body. The results reveal that two major shape parameters, i.e. fore-and-aft asymmetry and a constriction, are dominant in the entrapment phenomenon. The mechanism can be explained by the balance of two opposite rotational velocities: repelling velocity due to the ciliary beat and attracting velocity due to the collision at the interface. In other words, the mechanism can be understood by hydrodynamic and steric effects. Moreover, cells tend to be entrapped more by the water–air interface than by the solid wall, which agrees with experimental observations reported previously (Ferracci et al. 2013). Finally, we experimentally observe Tetrahymena thermophila entrapped on the surface of an air bubble, and qualitatively discuss the shape of entrapped cells. The knowledge obtained provides a basis for understanding the behaviours of swimming micro-organisms at various interfaces, both in nature and in industrial applications.