Schwegler was born at Michelbach in Württemberg, the son of a country pastor.
In 1843 he founded the Jahrbücher der Gegenwart, and became privatdozent of philosophy and classical philology at Tübingen university.