Flagella are hair-like projections from the surface of eukaryotic cells, and they play an important role in many cellular functions, such as cell-motility. The beating of flagella is enabled by their internal architecture, the axoneme, and is powered by a dense distribution of motor proteins, dyneins. The dyneins deliver the required mechanical work through the hydrolysis of ATP. Although the dynein-ATP cycle, the axoneme microstructure, and the flagellar-beating kinematics are well studied, their integration into a coherent picture of ATP-powered flagellar beating is still lacking. Here we show that a time-delayed negative-work-based switching mechanism is able to convert the individual sliding action of hundreds of dyneins into a regular overall beating pattern leading to propulsion. We developed a computational model based on a minimal representation of the axoneme consisting of two representative doublet microtubules connected by nexin links. The relative sliding of the microtubules is incorporated by modeling two groups of ATP-powered dyneins, each responsible for sliding in opposite directions. A time-delayed switching mechanism is postulated, which is key in converting the local individual sliding action of multiple dyneins into global beating. Our results demonstrate that an overall nonreciprocal beating pattern can emerge with time due to the spatial and temporal coordination of the individual dyneins. These findings provide insights in the fundamental working mechanism of axonemal dyneins and could possibly open new research directions in the field of flagellar motility.