Rugby Football was invented in November 1823, at Rugby School, when 17-year-old player William Webb Ellis - "with a fine disregard for the rules" - first picked up a ball and ran with it.
Various forms of football were played in many countries before codification bagan in Britain in the 19th century. In Ellis's time, each major English public school stuck to its own version, and inter-school matches were unknown. However, handling the ball was common to most forms of the game, until eventually banned from what became soccer in 1863. The Rugby Football Union was formed in 1871, its clubs drawn mostly from the London area. There's no doubt that the anomalous Rugby game has its modern roots in the eponymous school, but Ellis's involvement is entirely apocraphyl. The story appeared for the first time in 1875 (Ellis having died in 1872) in an article in the school magazine, and no evidence to support it was offered at the time or has ever emerged since. It seems likely that Ellis himself died quite unaware of his supposed role in sporting history.