Head coach Andy Reid, who had vowed to "tear things apart" after the Eagles blew a 10-point lead in an overtime loss to Detroit on Sunday, said Castillo had been dismissed and replaced by secondary coach Todd Bowles.
"I want to make it clear that I have nothing but the ultimate respect for Juan Castillo as a coach and as a person. He's one of the finest football coaches that I have ever worked with," Reid said in a statement.
"He has served this organisation extremely well for 18 years and letting him go was a difficult decision. I know he will continue to be a successful coach in this league and wish he and his family nothing but the best."
Castillo was fired just six weeks into the NFL season after the Eagles split the games 3-3. The team has been heavily criticised by supporters, prompting calls for changes with Reid and quarterback Michael Vick bearing the brunt of the blame.
"We're six games into the season and average isn't good enough," said Reid. "I know the potential of our team and insist on maximising it."
Castillo joined the Eagles in 1995 as an offensive assistant. He was promoted to defensive coordinator before the start of last season when Reid fired Sean McDermott.