Toprak was a regular in the Dortmund side of 2017-2018 but fell out of favour last season, making just one Bundesliga start as Lucien Favre's side narrowly missed out on the title.
He becomes the second defender to join Florian Kohfeldt's side in the close-season, after fellow centre-back Marco Friedl arrived in a €3.35 million ($5.55 million) deal from Bayern Munich.
Dortmund announced that Werder has "agreed a purchase option as part of the deal, which will take effect under realistic circumstances".
Turkey international Toprak, 30, started his career at Freiburg where he helped the club to 2. Bundesliga glory before joining Bayer Leverkusen for €3 million ($5 million) in June 2011.
Dortmund paid €12 million ($19.9 million) to take him to Signal Iduna Park in June 2017, and his most recent appearance came in a DFL-Supercup victory over Bayern Munich on 4 August (AEST).
Kohfeldt said: "Omer is a fast centre-back who has played at the highest level for years. We are very glad that he has decided to join us.
"He last played a very strong game in the Supercup against Bayern and can help us directly."