Fifa's Disciplinary Committee found Barcelona and the Spanish Football Association (RFEF) guilty of making or allowing illegal deals.
As well as the transfer ban, which will effectively last one year, FIFA fined Barcelona 450,000 Swiss francs, (369,000 euros, $509,000).
Barcelona were given 90 days to regularise the situation of all 10 minor players concerned.
The ban is a new blow to the image of Europe's most successful club of the 21st Century following alleged tax evasion in its signing of star Brazilian Neymar.
Fifa fined the Spanish federation 500,000 Swiss francs for their role in the under-age player affair and given one year to modify rules concerning international transfers of minors.
"The Disciplinary Committee regarded the infringements as serious and decided to sanction the club with a transfer ban at both national and international level for two complete and consecutive transfer periods," a Fifa statement announced.
The dramatic sanction follows an investigation last year by Fifa.
The world body looked at cases involving players signed by Barcelona between 2009 and 2013.
International rules state that a player has to be at least 18 to be transferred, unless the player falls into one of three specific cases.
Fifa found the club and the Spanish federation guilty of illegal deals involving "the international transfer and first registration of non-Spanish minors with the club".
The dates of the Spanish transfer windows covered by Wednesday's punishment are July 1-August 31 for the pre-season window and January 1-February 1 for the mid-season window.
Barcelona were caught out by Fifa's web-based Transfer Matching System which became mandatory for all international transfers of professional male footballers in October 2010.
Fifa said it took the protection of minors in football "very seriously", and warned that "young football players are vulnerable to exploitation and abuse in a foreign country without the proper controls".
The sanction came less than 24 hours after Barcelona's 1-1 draw with Atletico Madrid in the Champions League quarter-final first leg.
Barca's goal was scored by Neymar, whose scandal-mired transfer triggered the downfall of Barca president Sandro Rosell and saw the club indicted for an alleged tax fraud of 13.5 million euros.
Barca have protested their innocence throughout the Neymar inquiry by a Spanish judge.