Castellar de n'Hug (Catalan pronunciation: [kəstəˈʎa ðə ˈnuk], Spanish: Castellar de Nuch) is a municipality in the comarca of the Berguedà in Catalonia. It is situated on the southern slopes of the pyrenean range of the Creueta. The Llobregat river has its source on the territory of the municipality. The village is served by the B-403 road, which links it with La Pobla de Lillet and which continues over the Creueta to the comarques of the Ripollès and the Cerdanya.
The Asland del Clot del Moro cement factory, now closed along with the railway line which linked it to Guardiola de Berguedà, is a notable example of modernista industrial architecture. The roman church of Sant Vincenç de Rus conserves some original mural paintings.