The 23-year-old moves to the Premier League after just six months in Dutch football at the Abe Lenstra Stadion.
He has previously worked with Cardiff boss Ole Gunnar Solskjaer in Manchester United's reserve team and at Molde.
And the Cardiff boss is delighted to have been reunited with the creative midfielder.
"I've known Magnus for many years, having worked with him at Manchester United and then signing him for Molde," he told the club's official website.
"While I was there I had to sell him as he was our best player - and now I feel lucky to get to sign him again for Cardiff City for a reasonable price. I see this as money well spent.
"He's a playmaker, a quarterback if you will, someone who likes to get on the ball and can see a pass. He's technically very good, including set pieces and has great vision. Magnus will add a lot to Cardiff City and will blend in very well with the midfielders in the squad."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.