Moving the goalposts (or shifting the goalposts) is a metaphor, derived from goal-based sports, that means to change the rule or criterion (goal) of a process or competition while it is still in progress, in such a way that the new goal offers one side an advantage or disadvantage.
This phrase is British in origin and derives from sports that use goalposts. The figurative use alludes to the perceived unfairness in changing the goal one is trying to achieve after the process one is engaged in (e.g., a game of football) has already started.
Moving the goalposts is an informal fallacy in which evidence presented in response to a specific claim is dismissed and some other (often greater) evidence is demanded. That is, after an attempt has been made to score a goal, the goalposts are moved to exclude the attempt. The problem with changing the rules of the game is that the meaning of the result is changed, too.
Some include this metaphor as description of the tactics of harassment. In such cases, a re-defining of another's goals may in reality be intentionally devised so as to assure that an athlete, for example, will ultimately never be able to finally achieve the ever shifting goals.
In workplace bullying, shifting the goalposts is a conventional tactic in the process of humiliation.
Karl Popper coined the concept conventionalist twist or conventionalist stratagem in Conjectures and Refutations with similar use as this fallacy but in the context of the falsifiability of certain scientific theories.