The 25-year-old Norwegian steps up from his own private Adapta team to front M-Sport's factory squad in a Fiesta RS WRC on all 13 rounds of next year's WRC.
"I am really happy to have been chosen to join the team and continue working closely with M-Sport next season," said Ostberg, who was a frontrunner for the second works Citroen seat before the team opted for Dani Sordo.
"We've been working with the car for two years now, we know the car and we know the team so from the technical side of things, I think we will be in a really good position as there won't be too much of a change to get used to.
"But from the other side of things, it will still be a big challenge - albeit a big step in the right direction.
"This season has been really good for us, and I hope we can continue that into 2013. I am really looking forward to next season, and I can't wait to get back behind the wheel and start testing with the team.
"This is a great opportunity for me. I have had many dreams in my career, but achieving this drive is definitely one of the biggest and I am certainly going to try and make the most of it."
Ostberg won this year's Rally of Portugal and finished fourth in the championship.
Team boss Malcolm Wilson is expecting similarly strong performances in the Qatar car next year.
"Mads' performance this year has been very impressive," said Wilson. "He has always had the speed, but his progression on Tarmac and the maturity he has demonstrated this season proves that he is ready to make the next step in his career and made him the ideal candidate to join the team in 2013.
"He has an old head on young shoulders and I am confident that we will see some strong performances from him as he rises to the challenge next year."
Ostberg will be joined in the team on seven of the 13 rounds by Qatar's Nasser Al-Attiyah.
No decision has been taken on the identity of Ostberg's full-time team-mate for next season.
- Sports & Recreation