Players who display messages on T-shirts worn underneath their strips will face punishment after new proposals were agreed.
The International Football Association Board (IFAB), the body which oversees the rules of the game, passed the law at a meeting in Zurich.
It will come in to force on 1 June, in time for the World Cup in Brazil.
The new law was proposed by the Football Association and will apply to domestic and international football.
FA general secretary Alex Horne said: "The idea is to get some consistency. The simplest rule for the image of the game is to start from the basis that slogans will not be allowed."
From the time the new rule comes in to place, incidents such as Mario Balotelli's infamous "Why Always Me?" message, which he revealed after scoring against Manchester United in 2011, will be banned and subject to a sanction.
Fifa general secretary Jerome Valcke said: "It is definitely decided that players must not have any slogan or statement, and we are making the decision that it will apply to the World Cup."
Law 4 of the game, which relates to players' equipment, will be amended.