El Escorial is a municipality in the Autonomous Community of Madrid, located 45 km northwest of the Spanish capital Madrid. It belongs to the comarca of Cuenca del Guadarrama. Its population in 2009 was 14,979.
The territory of El Escorial is home to the park of La Granjilla de la Fresneda. The famous Royal Seat of San Lorenzo de El Escorial also known as Monasterio de El Escorial or El Escorial, is located in the adjacent municipality of San Lorenzo de El Escorial. On the outskirts of San Lorenzo de El Escorial is the national memorial Valle de los Caídos.
The name of the town derives from slag deposits from an old local foundry.