Castro has played for the likes of Malaga, Sporting Gijon and Getafe and coach Kenny Lowe said he was pleased to have landed the 33 year-old.
"Diego has played in the highest leagues of Spanish football for a long period of time playing nearly 300 games and scoring around 60 goals, so there is no doubting his quality," Lowe said.
"He gives us another option in attack, and really enhances the squad for both the coming season."
Castro, whose move is subject to a medical, said he was looking forward to playing in Australia.
"I arrive in Australia still hungry for success and with hopes of challenging for trophies with my new team mates," Castro, who started his career with Pontevedra, said.
"The Hyundai A-League is a competition that is gaining respect in Europe and I am excited to be involved with Perth Glory for the coming season."
Castro is Glory's seventh off-season recruit after the additions of Antony Golec, Ante Covic, Hagi Gligor, Jerrad Tyson, Marc Warren and Alex Grant, and owner Tony Sage said he was excited by the prospect of watching the marquee man in action.
"Diego loves to run at defenders and score goals. I've seen vision of him playing and scoring against Real Madrid so to have him lining up in purple this season is very exciting for everyone," Sage said.