What is the meaning of Endgame?

The final stage of a game of chess, when there are few pieces left.

The final stage of a game of bridge, when there are few cards left.

The final stage of any game.

The final stage of an extended process or course of events, especially with the implication of the imminent realization of a masterful strategy or plan.

The gameplay available in a massively multiplayer online role-playing game for players who have completed all of the preset challenges.

Having become canon by the end of the plot of a work of fiction or speculated to be intended to become such.

Source: wiktionary.org