Wehrheim was first mentioned in documents in the year 1046. In this certificate the emperor Henry III bequeathed the personal property of "Wirena" to his wife Agnes. Later, the viscounts of Friedberg are named as owners. In the 13th century, the imperial property fell to the earls of Diez. Among the Earls of Diez, the little town received city rights in 1372, but lost them again in 1814. In 1243 the convent Thron was built as foundation of Earl Gerhard of Dietz.
In the succession of the Earls of Diez, Wehrheim was imparted to Nassau-Dillenburg. In the first third of the 16th century the Earls of Nassau introduced the reformation. Resultantly, conflicts with the neighboring electorate of Trier arose. In the contract of Diez in 1564, a division of the sovereignty over Wehrheim was agreed. Thus, the bureau of Wehrheim possessed authorities not only of Nassau, but also authorities of Trier. Later, Wehrheim became a part of Nassau-Usingen, the duchy of Nassau, and as of 1866 Prussian.
In 1895 the railway line from Bad Homburg, Homburg at that time, via Friedrichsdorf to Usingen went into operation and was extended to Weilburg some years later.
With this step, the community was connected more closely to the Frankfurt area, a development that continued for the next 100 years.