Moving the goalposts (or shifting the goalposts) is a metaphor, derived from American football or other games, that means to change the criterion (goal) of a process or competition while still in progress, in such a way that the new goal offers one side an intentional advantage or disadvantage.
This phrase is a straightforward derivation from sports that use goalposts, such as American football. 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, similar to "shifting sands" and also known as raising the bar, is an informal logically fallacious argument 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 end result is changed too. It counts for less.
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.
Moving the goalposts may also refer to feature creep, in which the completion of a product like software is not acknowledged because an evolving list of required features changes over time, which in extreme cases may even require rewriting the entire program. Thus, the goal of "completing" the product for a client may never occur.
The term is often used in business to imply bad faith on the part of those setting goals for others to meet, by arbitrarily making additional demands just as the initial ones are about to be met. Accusations of this form of abuse tend to occur when there are unstated assumptions that are obvious to one party but not to another.