Daehli, who has signed for an undisclosed fee, was previously on the books with Manchester United when Solskjaer was working as a youth coach there.
His arrival follows that of countryman Magnus Wolff Eikrem, who joined Cardiff from Dutch club Heerenveen earlier this week.
"I am pleased to announce we have signed Mats from Molde," Solskjaer said, shortly after his side's 2-0 loss at home to West Ham United in the Premier League.
"We had some competition and I'm glad to say he has chosen to come to Cardiff instead of going back to where he was before.
"He had talks with United, they had the option to bring him back as part of the deal with Molde, but he has decided to come here and that shows his desire to do well here.
Daehli, who is a Norway international, said his desire to work with Solskjær again had drawn him to the Cardiff City Stadium.
"Of course it was difficult to say no to Manchester United," he said.
"I had good years there, but I wanted to play for this manager. He said he wanted to take me here. I am delighted to sign and I want to help the team."
Solskjær, who played for Molde himself before joining United in 1996, was appointed as the successor to Malky Mackay at Cardiff last week.