How did castling become part of the rules of chess?
Castling was introduced to chess as a way to accelerate the game and protect the king, evolving alongside other major rule changes that modernized the sport during the 15th century.1
While the move was known as early as the 15th century, it did not gain widespread, standardized acceptance until the 18th century. Before these developments, the game was often characterized by slow, trench-like warfare where checkmate was relatively rare. The introduction of castling, alongside the en passant capture and the increased mobility of the queen and bishop, transformed chess into a more dynamic game where checkmate could be achieved much more quickly.1
For a long period, regional variations persisted, and it took several hundred years for these rules to become universally adopted across Europe.1