Castillo de Villamalefa is a municipality in Spain, located in the Valencian Community within the province of Castellón. It is a small inland settlement in the mountainous interior of the region, distinct from the larger and better-known Valencian towns that share elements of its name.
The municipality covers an area of 37.7 km². Its population was recorded as 104 in 2005, making it one of the sparsely populated rural localities of the province. The low population density reflects the pattern common to many villages in the Castellón hinterland.
As a municipality, Castillo de Villamalefa forms part of the administrative structure of the Valencian Community, with local governance corresponding to its status as a Spanish municipality. Its small size and inland setting place it among the minor rural settlements of the province rather than its urban centres.