Meschede, 24, spent 2015 on a season-long loan at the Welsh county, taking part in all formats.
"Craig played an important role in our team last season," Glamorgan chief executive Hugh Morris told their website.
"Although we were keen to keep him, any deal relied on Somerset's sanction as he had a year to run on his contract."
Meschede has taken 92 wickets in 45 first-class matches and has scored 1,312 runs in first-class cricket, averaging 24.29.
His maiden hundred came against Surrey in Cardiff, a game in which he also made headlines in for dismissing ex-England batsman Kevin Pietersen cheaply on his return to county cricket.
Morris added: "We've signed a player who adds a lot to the side and also has the potential to develop further."
Meschede said: "I really enjoyed my time at Glamorgan last year and everyone made me feel welcome, so I look forward to returning on a full-time basis," Meschede said.
In statement on social media, Meschede added: "It has not been an easy decision (to leave Somerset), but I feel at this stage of my career I need to be playing regular first team cricket."
Glamorgan have signed all-rounder Craig Meschede from Somerset on a three-year contract.