The 40-year-old Norwegian, who earned a place in United's history by scoring the winning goal in the 1999 Champions League final against Bayern Munich, replaces Malky Mackay who was fired last week.
"Cardiff City Football Club are delighted to announce that Ole Gunnar Solskjaer has joined as first team manager," the club said in a statement.
Caretaker David Kerslake has been running the team since Mackay left and they are 17th in the table, one point above the relegation zone, after losing 2-0 at Arsenal on New Year's Day.
Solskjaer has been managing Norwegians Molde for three years, leading them to the first league title in their 100-year history in 2011 and retaining the crown a year later. They also won the Norwegian Cup last year.
The task he faces now will be focused on survival rather than titles as Cardiff battle to preserve their top-flight status, achieved last season under Mackay after an absence of 51 years.
Mackay was sacked after falling out with billionaire Malaysian owner Vincent Tan in a series of public squabbles and despite being acclaimed by fans as the best manager the club has had.
Solskjaer, who sat next to Tan at Arsenal on Wednesday, will be in charge for Saturday's FA Cup third round tie at Newcastle United.


Latest News from Sports News Desk