The 28-year-old's switch will be completed upon agreeing personal terms and passing a medical with the Russian outfit, with Guangzhou confirming via their official website that the transfer fee "satisfied the club."
Barrios moved to China in May 2012 after winning the Bundesliga with Borussia Dortmund but struggled to hold down a regular place with the run-away Chinese Super League leaders, despite a decent return of 13 goals in 32 appearances.
The striker had claimed in an interview with German magazine Kicker earlier this year that he had not been paid on time by Guangzhou and that he was looking to cancel his contract in order to return to Germany.
This prompted the Chinese outfit to bring a complaint to Fifa, in which they demanded €25m (£21.4m) in compensation and a six-month ban for the striker for a breach of contract.
However, the transfer to Spartak now looks set to bring the dispute to a close, with Guangzhou confirming they would "withdraw charges once the transfer procedure is done" in a statement.Barrios had been linked with a move back to the Bundesliga with Werder Bremen but Spartak moved quickly to secure his services following the €13m (£11.1m) sale of Emmanuel Emenike to Fenerbahce.