As far as I know: Chess was invented in India toward 500 AD (at least that's the earliest evidence we have); the game was called "Chaturanga", and the exact rules aren't known, but can be inferred to a good degree from the games that developped out of Chaturanga, in the west and in the east.
The first game of "chess" we know the rules of is Shatranj, the Persian version of the game, that developed pretty early and was the version that came to the west.
However, the transformation of Shatranj into modern chess was a gradual developement: the ability of pawns to move two squares on their first movement, and the subsequent en passant rule, appeared in the 14th century; the current movement of the queen and bishops, as well as the modern rules of castling, were established around the late 15th century. Some details were only established quite late in the history of the game (the rule that white always starts only became official in the late 19th century).
-----
As far as I know, the most ancient games (at least from what is attested by archeological evidence) are race games (like backgammon), where the goal is for each player to be the first to remove all of his pieces from the board, and movement is generally determined by a roll of dice (but there is still a tactical element brought by the fact that for any given roll of the dice, a player usually has many different possible movements).
Very old racing games include senet (could be as old as 3500 BC), ancient persian variants of Backgammon (aka Tables, 3000 BC) and the Royal game of Ur (2600 BC). A notable trait of race games is that they seem to have been invented independently several times: the mezoamerican game of Patolli (attested from at least 200 BC), which is a race game, ressembles indian Parcheesi a lot, but seems to be unrelated to it.
In the middle ages, race games would thus already been present in almost all of the old world, and parts of the new world as well, whereas other games had much more restricted distribution.