Basketball was invented in December 1891 by a Canadian gym teacher named James Naismith. He invented basketball as he needed a way to keep his gym class active on days where it was not possible to be outside. He wrote some simple rules and used and peach basket and a soccer ball to play the first game. The first game of basketball was played on January 20, 1892.