As with most games that have been played for hundreds of years, the origins of mahjong are not documented and unclear. Theories place its creation as far back as in 500 B.C., but extensive written records of it did not appear outside of China until the late 1800s.
There is a theory that Confucius created mahjong, but this is more of a legend as the only basis for it is that the three dragon tiles match his three noble virtues. The game bears some similarity to a card game called M?diào that originated in the early Ming dynasty. The first account of it in the West is by William Henry Wilkinson, who mentioned it in a paper in 1895.