The 20-year-old's future has been the subject of much speculation during the current transfer window, with a number of clubs said to have been interested in his services.
Real Sociedad had recently been in discussions over a potential deal for Manchester United's Donny van de Beek but allegedly dropped their interest in order to focus on Zakharyan.
The Russia international made 89 appearances during his time with Dynamo Moscow, scoring 19 goals and registering 25 assists in the process.
The forward has already played five times for the Russian club this season, scoring twice and providing one assist, but his exit has now been confirmed.
Zakharyan has left Dynamo Moscow with a record of 15 goals and 23 assists in 72 league appearances, but he has never played in a European competition for the club.
Real Sociedad are in the Champions League this season, having finished fourth in La Liga last term.
The youngster has become the Basque outfit's third signing of the summer transfer window, with Hamari Traore arriving from Rennes and Andre Silva on loan from RB Leipzig.
David Silva has been their biggest departure in terms of a name, and Real Sociedad have therefore been in the market for an attacking replacement for the 37-year-old.
Imanol Alguacil's side opened their 2023-24 La Liga campaign with a 1-1 draw against Girona on August 12 before also playing out a 1-1 draw with Celta Vigo on Saturday.
The Basque outfit will now be bidding to record their first victory of the season when they head to Las Palmas next Saturday.