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.
It states: "Players must not reveal undergarments that show political, religious, personal slogans, statements or images, or advertising other than the manufacturer logo.
"A player/team of a player that reveals an undergarment that shows political, religious, personal slogans, statements or images, or advertising other than the manufacturers' logo will be sanctioned by the competition organiser or by Fifa."
Meanwhile, the IFAB rejected a proposal from Uefa to amend the so-called "triple punishment" which occurs when a penalty kick is given within a game, warranting a player being sent off and a possible goal being scored.
It was agreed that a pilot project carried out by the FA and Scottish Football Association relating to revolving substitutes in amateur football will continue, as will a Uefa experiment into the use of a sin bin in recreational football.
The IFAB also discussed the potential use of video replays for match officials but remains of the view that technology should be allowed only for goal-line incidents because "it is a clear yes or no decision".
An IFAB statement read: "Concerns were raised about video replays slowing the game down and increasing the number of stoppages."