The 39-year-old and his wife acted as guarantors of another Ecuadoran family's loan under a programme run by an agency that negotiated loans for immigrants.
In return, that family acted as the guarantor for Castillo's loan.
Now, both families are in arrears.
And each of them is legally responsible for its own loan and for the loan it guaranteed.
"We were two families and we did not know each other. Ecuadorans are like that. We had to sign the papers and that's it. Goodbye, and each side went its own way," said Castillo.
Dozens of anti-eviction activists had gathered outside his Madrid apartment building on Tuesday to prevent court clerks and bank officials from ejecting Castillo and his family from their home.
Inside the apartment a volunteer psychologist tried to comfort Castillo's wife, 40-year-old Kelly Herrera, who sat in distress on the couch while the couple talked to police.
The couple were given until March 30 to pay their debt of 222,000 euros ($291,000) claimed by the bank. And they are still liable for the loan given to the other family.
"Today they are demanding my loan. But later on they will demand the second," said Castillo.
The couple's lawyer Rafael Mayoral had requested that the eviction be blocked for "humanitarian reasons" because their two children are minors and a knee injury prevents Herrera from working at the moment.
But above all the lawyer argued that the couple are "victims of a swindle".
The couple and nine other families are suing an agency, Central Hipotecaria del Inmigrante, which ran a system of "cross guarantors" for loans among people that did not always know each other.
"It was a pyramid scheme of financial risk management," said Mayoral.
Despite the investigation under way into the agency, the courts have refused to issue a moratorium on evictions.
Last week the government approved a voluntary "code of conduct" for banks that aims to help poor homeowners settle their debts and reduce a wave of evictions brought on by Spain's economic crisis.
For families whose members are all out of work and have no other source of income, the code obliges signatory banks to restructure their mortgage debt by for example lengthening the term of the loan or reducing its interest rate.
The goal is to reduce the number of evictions in Spain, which amount to about 300,000 since the collapse of a property bubble in 2008.
But the new code will not help Castillo and his family.
"The bank did not give me any option, I wanted to give them the apartment in exchange for clearing my debt but they were not interested," he said.
Castillo, a waiter, said with pride that he "only spent a few months out of work" since he moved to Spain in 1996.
In 2006 he and his wife decided to buy an apartment while Spain was still in the midst of a property boom.
The couple took out a mortgage with a variable rate that started out with a monthly payment of 900 euros.
But as Euribor interest rates rose, their monthly mortgage payment shot up to 1,420 euros.
"It became impossible to pay. I earned 1,000 euros a month and my wife also did not earn much. Things became complicated. I tried to reach an agreement with the bank but it was not possible. I stopped paying," said Castillo.
Castillo said he did not know if the family which signed as the guarantor of his loan has suffered any consequences because he stopped making his mortgage payments.
"I only met them the day we signed the papers," he said.