We report the layering and liquid–liquid phase transition of liquid titanium confined between two parallel panel walls. Abnormal changes in the volume and the potential energy confirm the existence of the liquid–liquid phase transition of the liquid titanium. The typical feature of the liquid–liquid phase transition is layering, which is induced by the slit size, pressure and temperature. We highlight the fact that the slit size and pressure will determine the number of layers. In addition, with the change in the slit size, the density of the confined liquid expresses a fluctuating law. The phase diagram of the layering transition is drawn to clearly understand the layering. This study provides insights into the liquid–liquid phase transition of liquid metal in a confined space.