Born in Chaves, Castanheira signed with Braga for the 1996–97 season, and would remain there for over eleven years, always in the Primeira Liga.
His spell was a steady one, as he was always counted on by several team coaches, and he was influential when Hungarian Miklós Fehér joined the club in 2000–01, providing ten assists as the striker scored 14 goals; he also served as co-captain during his stay.
Castanheira was a relatively important part of the squad that finished in fourth place in 2005–06, appearing in 17 league matches (no goals).
In January 2008, as his importance in the team was gradually diminishing, he was loaned to top division promotees Leixões, until the end of the season.
[1] Aged nearly 35, Castanheira moved abroad for the first time, joining several compatriots at Cypriot club Doxa Katokopias.