The moves marks a return to his home country for the Russian 26-year-old, who moved to Goodison Park from Lokomotiv Moscow in August 2009.
The Russia international has already agreed personal terms with Spartak and has travelled to undertake a medical.
A statement on the Everton website on Wednesday afternoon confirmed: "Everton have agreed a fee with Spartak Moscow for the transfer of Diniyar Bilyaletdinov.
"The Blues have been in negotiations with Spartak for several days and an undisclosed figure has now been agreed, paving the way for Bilyaletdinov to return to his homeland."
The 45-cap player enjoyed a fine start to his time with Everton, and scored the club's goal of the season for an effort against Manchester United in 2009.
He struggled since then, though.
In the summer he began to publicly air his frustrations and unhappiness and suggested if the situation did not improve he would have to move to find regular first-team football.
Bilyaletdinov has started just seven league matches this season and the club have decided he can now leave.
In total he has made 77 appearances for the club, scoring nine goals.
Source: PA
Source: PA