We propose a theory of first-mover advantage rooted in decision-making errors. In our simulation model the first-mover holds a trivially small initial advantage. If the second-mover is prone to making more mistakes than the first-mover, it reinforces the first-mover's advantage. Our model shows that an increase in the abilities of the first and second-mover and the intensity of rivalry between them strengthen the first-mover advantage. The model also predicts that complexity of the decision making environment amplifies first-mover advantage by increasing the likelihood of errors, particularly for the second-mover. To test the implications of our model, we analyze 3.66 million chess games, finding consistent supporting evidence. The first-mover advantage increases with player ability, from 3 percent for low-ability players to 12 percent for high-ability players, and peaks when players are evenly matched. Complexity in the opening stage of a game increases first-mover advantage. Our move-by-move analysis of game positions indicates that players indeed commit significantly more errors when facing complex positions from a slightly worse position, consistent with the model's prediction and the game-level evidence.