Muller, now 29, was awarded his first Springbok cap against Scotland in 2006. He captained South Africa against New Zealand in 2007 and also appeared in the 2007 Rugby World Cup in France.
He has made over 130 appearances for the Sharks and captained the side during the 2008 and 2009 Super 14 seasons. He also led the Sharks to a Currie Cup success in 2008.
Commenting on Ulster Rugby's first signing ahead of the 2010/11 season, director of rugby operations David Humphreys said: "Ulster Rugby is looking forward to welcoming another world class South African forward to Belfast for the next two seasons.
"A lineout specialist and respected captain, Johann will add a hard edge to a pack that, under Brian McLaughlin and Jeremy Davidson, has become increasingly competitive over the past few months.
"A lot has been spoken about the potential and the youth of this current Ulster squad and we are committed to signing foreign players who, like Johann, have the ability to improve our performances on the pitch but also help develop these young players into Ulster and Ireland stars of the next decade."
Speaking about his move to Ulster, Muller remarked: "My family - my wife Mariska and one-year-old daughter Anja - and I are really looking forward to our new life in Ulster, and reuniting with my old friend BJ (Botha) and his family.
"I am very excited by this opportunity to play for a club with such a rich rugby tradition and awesome support.
"My 12 years with the Sharks in Durban have been unforgettable and I know that my years at Ulster have many more wonderful memories in store for me.
"I would like to thank my current CEO Brian van Zyl, and his management, for their support in my decision and to David Humphreys for inviting me to Ulster and portraying the passion of the club. I look forward to meeting you all in July at Ravenhill."