The 26-year-old defender looked set to leave the Community Stadium and was linked with a number of Championship clubs as well as Scottish champions Celtic. But he has now put pen to paper on a three-year contract to the delight of manager John Ward.
"All the way along I have had huge respect for Magnus's desire to play at a higher level," Ward told the club's official website.
"We have kept in touch throughout the summer to discuss his future with a number of conversations and messages along the way and came to the agreement of what he wanted to do in seeking that opportunity.
"We touched base on Wednesday to see how he was getting on as it seemed things had gone a bit quiet for him, so we offered him the chance to come back to Colchester and he was more than happy to accept that invitation."