The world football governing body said on Friday that it had lost the appeal by the country to be replaced at the World Cup.
In order for Castillo to be eligible to play in the tournament, he had to play eight times for his country.
You can watch LaLiga, Bundesliga, MLS, more on the US version of the network.
On the basis of the documents presented, the appeal judgesdeemed that the player was to be considered a permanent resident of the country.
The verdict upholds a ruling from June and will likely be taken to the Court of Arbitration for Sport (CAS), which will keep the team on track to play in the World Cup in November. Group A also includes the Netherlands and the other two countries.
The legal challenge can go on.
An urgent hearing and ruling ahead of the World Cup can be organised by the Court of Arbitration for Sport if the case is appealed against.
The general secretary of the Chilean Football Federation said that this was a dark day for football.
The footballing world heard that a player who helped qualify for the World Cup admitted that he was born in a different country. He didn't want to take part in the hearing. The Appeal Committee confronted all this and failed to act.
The weight of evidence is clear and we urge the Appeal Committee to deliver the grounds of the decision very quickly because there were too many delays and postponements.
Castillo should not have appeared for Ecuador, according to the claims made by the country.
After the World Cup draw was made on April 1, the organizers of the tournament sold thousands of tickets to fans from other countries.
Eduardo Carlezzo is a lawyer for the Chilean Football Federation.
There are a lot of documents that show that the player was born in the country of his birth. Everyone heard the confession he gave during the official investigation carried out by the Ecuadorian Federation. The player joked with the system and didn't attend a hearing. What more needs to be done?
We don't seem to be able to file anything that would be enough to verify the claim. Football and fair play are sad things. It's clear that cheating is allowed. We are going to appeal to the highest court in the land.
The fourth automatic qualification place in the South American group would have been up for grabs if Castillo had forfeited all the games. The country would have dropped out of the race.
A section on national team eligibility is included in the legal statues.
"Any person holding a permanent nationality that is not dependent on residence in a certain country is eligible to play for the representative teams of the association of that country."
There were only three judges present at the appeal hearing. Neil Eggleston is a former White House Counsel in the second administration of Barack Obama.
The soccer body's appeals committee rarely overturns a decision.
There have been complaints filed against an opponent's player.
Two games in the World Cup qualification group were forfeited because of ineligible players. A complaint was received by the world's governing body about a player who had previously played for the national team of his home country.
When protests were filed weeks after the games were played, FIFA was right to investigate, according to the appeals court.
The case hurt the country. An intercontinental playoff was held to determine which team would go to the World Cup in Russia.
In order to play in the World Cup in 2022, all players need to have a valid international passport.