"Barcelona had breached the rules regarding the protection of minors and the registration of minors attending football academies," CAS said in a statement.
The ruling means Barcelona will be barred from signing any players in 2015, although it can still renew existing contracts, fire players and recall those loaned to other clubs, such as Denis Suarez and Gerard Deulofeu, both at Sevilla.
CAS also upheld a fine of 450,000 Swiss francs ($455,000) imposed against Barcelona.
FIFA said CAS had "shown clear and strong support for FIFA's efforts to protect underage players."
The club said in a statement it totally disagreed with the ruling and considered the sanction "completely disproportionate."
It said the club understood and supported FIFA's protection for minors policy and insisted it had acted correctly.
"Barcelona's youth structure has enabled hundreds of young players to achieve their dreams," the club said.
Barcelona said it was evaluating legal options, including appealing the decision to the Swiss Federal Court.
"A gross injustice has been committed," Barcelona president Josep Bartomeu said. "Priority has been given to a poorly-conceived rule rather than to its spirit."
The club is renowned for training and educating young players such as Lionel Messi and Andres Iniesta at its La Masia academy.
FIFA exerts rigid control over transferring minors across international borders. In Feb. 2013, FIFA found that Barcelona had violated those regulations when it signed 10 players under the age of 18 to its academy.
It was that finding that Barcelona appealed. The club now has 90 days to "regularize the situation" of all minor players affected by the ruling.
The international transfer of players under the age of 18 can only go through if their parents move to the country for non-football reasons.
Players between 16 and 18 can move within Europe if certain standards of education and living conditions are met.
Barcelona has always argued that La Masia fulfilled the most stringent requirements.
Spain's league called La Masia "a world-class example" and said it was conducting a review into how Spain's legislation might be at odds with FIFA's regulations and those applied elsewhere in the European Union.
The league said in a statement that based on its conclusions it would consider making an official complaint to "the competent EU bodies" about FIFA's regulations governing transfers of minors.
The concept of a youth training centre was first proposed to Barcelona by Johan Cruyff, who graduated from a similar program at Ajax, and La Masia was opened in 1979.
Located away from the Nou Camp, it is a boarding school where academic learning is combined with physical training for talented young players.