Moving the goalposts
Changing the target of a process or competition to by one side in order to gain advantage.
This phrase is a straightforward derivation from sports that use goalposts, that is, Football, Rugby Football, American Football etc. The figurative use alludes to the perceived unfairness in changing the goal one is trying to achieve after the process one is engaged in has already started.
The phrase came into wide use in the UK during the 1980s. The first citation I can find of it, although I'm sure there must be earlier ones, is a report of a meeting of finance ministers, in the Jamaican newspaper The Gleaner, September 1987:
"I see no reason to move the goalposts at all." said British Chancellor of the Exchequer (finance minister) Nigel Lawson.