On the play, Castillo put a left-footed shot into the bottom left corner of the net after a pass from David Ferreira.
FCD (8-2-3) stretched its home unbeaten streak to eight games with the victory.
The Earthquakes (3-5-6) had their best chance a 2 minutes later when Victor Bernardez had a shot bang off the crossbar.
Chipotle plans first price increase in 3 years
Disney's 'Jessie' to feature network's first engagement