O'Brien, who started refereeing in 1982 and was one of New Zealand's first professional referees in 1997, is widely regarded as one of the best match officials in the world and said it was largely family reason that had led to his decision.
"I always wanted to leave the game on my terms and near the top of the tree. Having achieved my goal of refereeing to the best of my ability at a Rugby World Cup and having been professional for nine years now, the desire to keep tripping around the world was starting to wane," he said.
"Rugby has been fantastic to me and owes me nothing so I wanted to leave with absolutely no regrets and that is exactly what I am doing."
O'Brien has officiated 218 first class games and 37 Tests - the most by a New Zealand referee - and has also been in charge of more than 50 Super 12 matches including the 1998 and 2001 finals.
One of his finest games was in the deciding third Test between the Lions and Australia in 2001, and he officiated the World Cup semi-final between France and England in 2003 and has run the touch for the 1999 and 2003 World Cup finals.
He takes up his new appointment with the NZRU in August.