The source is Mishnah Pesachim 10:8. The gist is that after a certain point there is to be no afikoman.
The problem is not just what the key words mean – ein maftirin, achar hapesach, and afikoman – but why our custom is the opposite of the Mishnah rule: though the rule clearly says “no afikoman“, we have something which we call afikoman.
But first, why is the rule cited as the answer to the wise son?
He asks a complicated question, wanting full details of the practices of the festival. What we tell him is about afikoman.
Is it because this passage comes almost at the very end of Mishnah Pesachim, and we want him to know the massechta from alef to tav? Or is it that the internal difficulties in the passage need the intellect of a wise son?
The three main internal problems with the passage are the following:
Ein maftirin: The etymology indicates a root p-t-r, “to depart”, “to conclude”.
Is ein maftirin prescriptive (“do not!”), or descriptive (“it is not customary!”)?
In both cases, maftirin is linked with the liturgical Maftir and Haftarah which conclude the Scriptural readings of the day and mark the departure from the synagogue after Shacharit (Musaf did not at first follow immediately). Similarly, Leil Seder must have had a concluding point.
Achar hapesach: Three possibilities – “after eating the korban pesach“, “after concluding the Leil Seder ritual”, “after leaving the Seder venue” – all affirm that there is a conclusion to the ceremony and whichever way we measure it we must (or do) not proceed to afikoman.
A halachic issue arose once the korban pesach was no longer possible and the matzah became the main food. Could the Mishnah be read as saying ein maftirin achar hamatzah…? Despite contrary views, it is this which has become the rule.
Afikoman: The Bavli sees it as a type of food, or a move from one group to another (Pes. 119b). The Y’rushalmi understands it as a type of entertainment and also posits the alternative of a move to another group (Pes. 10:4; 37d).
If the word is Aramaic, it may indicate “take away the food” or “take away the vessels”. A Greek derivation would read the word epikomon, i.e. “belonging to the komos” – “a jovial festivity with music and dancing”.
The options all come to the same conclusion – that the serious mood and taste of the evening must be maintained and not compromised by after-meal frivolity.
Why did Jewish usage transfer the name afikoman to a final taste of matzah and turn it into a positive requirement despite the Mishnah rule?
The wish was to end the Seder with a Pesach taste, using a hidden or stored (tzafun) piece of matzah to which the name afikoman was carelessly applied.
Hastening to the (wrongly named) afikoman was given a messianic interpretation by some scholars, e.g. David Daube, who says that “tzafun, which may denote both ‘that which is preserved’ and ‘that which is hidden’ (is) a suitable designation for the Messiah waiting in the wings to be summoned to his task”.