In a data transmission method, if a to-be-transmitted second data frame exists in a process in which a network device transmits a first data frame, and a priority of the second data frame is higher than a priority of the first data frame, the network device determines a frame type of the second data frame as an express frame. The network device adjusts a frame type of the first data frame to a preemptable frame if the frame type of the first data frame is an express frame. Then, the network device stops transmitting the first data frame, and starts to transmit the second data frame.