The 21-year-old striker took his medical with Sociedad on Thursday morning before penning a four-year contract with the Primera Division outfit.
A club statement read: "Real Sociedad have reached an agreement with Fiorentina for the signing of striker Haris Seferovic. The club have also finalised an agreement with the Swiss international for his incorporation into our team until June 30, 2017.
"Seferovic will return to his country today to resolve personal matters and will be officially presented by the club at the start of next week."
Seferovic, who becomes Sociedad's second summer signing after the return of Jose Angel on loan, joined Fiorentina from Grasshoppers in 2010 and has spent loan spells at Neuchatel Xamax, Lecce and Novara in the last three years.
Sociedad finished fourth in the Primera Division last season after leapfrogging above Valencia on the final day. Coach Philippe Montanier left at the end of the campaign with his assistant Jagoba Arrasate being promoted to take his place on the bench.