Rugby was officially invented in 1823. The old story goes (and it is likely just a tall tale) that a student at the Rugby School in England by the name of William Webb Ellis was tired of playing soccer, so he picked up the ball, ran into the goal and set it down.
The truth is, a game much like rugby was being played by the ancient Romans over 2,000 years ago. That game, called harpastum, had many similar elements. Similar games were also played throughout medieval England.