O'Cain was hired Tuesday as quarterbacks coach and offensive coordinator. He was fired Nov. 24 by N.C. State after going 6-6 this season. His overall record at the university was 41-40 in seven seasons as head coach.
N.C. State has not yet hired a successor.
Critics had discussed the possibility of O'Cain being hired in Chapel Hill after UNC coach Carl Torbush fired offensive coordinator Steve Marshall.
After officially making a settlement with N.C. State, O'Cain took the job at UNC.
O'Cain and Torbush are longtime friends, and Torbush has always had high regard for O'Cain. In return, O'Cain says he is flattered to be asked to join what he thinks is a fine program.
"When the university feels like you can coach, and you have the skills, the tools, and the football knowledge to come in and get the job done makes you feel very good," O'Cain said. "It's a tremendous university, one I have tremendous respect for. Even through the years I was competing against them, the respect was always there for the university."
UNC is not the first state rival O'Cain has worked for.
O'Cain was a standout quarterback at Clemson from 1974 to 1976. He was an assistant at The Citadel, Murray State and East Carolina before coming to N.C. State in 1986 as quarterbacks coach. In June 1993, he succeeded Dick Sheridan as head coach of N.C. State.
Carl Torbush hopes working with O'Cain will result in an ideal marriage.
"We're thrilled to be able to add a coach and person the caliber of Mike O'Cain to the North Carolina football program," Torbush said. "It's no secret that I admire and respect what he's done throughout his career as a football coach.
"I'm very excited to have him as a part of our staff," Torbush said.
O'Cain was officially able to sign with UNC after he reached a settlement with N.C. State. As part of his settlement, O'Cain will reportedly receive $146,003.
North Carolina gave O'Cain a two-year contract worth $115,000 a year.
Reaction was mixed after fans heard the news of O'Cain's hiring by UNC. On Raleigh sports radio 850 The Buzz, news of O'Cain's hiring dominated the local airwaves.
"I think he is going to do a good job," said Adam Gold, talk shot host on 850 AM The Buzz. "I think there is a little bit of jealousy and understanding that he is going to go up there and do a good job, and it is going to come back and haunt them."
On N.C. State's campus, fans and faculty seemed supportive of O'Cain's move.
"As far as him going to Carolina, which I understand he is doing, he has got the right to work with whoever he would like to work," said Lonnie Freeman, an N.C. State fan.
N.C. State chancellor Marye Ann Fox says it will be a different sensation to see O'Cain on the other sideline, but she is happy for him.
"We rejoice in his success and wish him all the best," Fox said.
O'Cain said he told Torbush he did not have anything to wear in Tar Heel blue to wear Tuesday but he did appear with a blue Oxford shirt.
Of the change in school colors, O'Cain said, "It's not weird at all. It feels pretty good." From staff and wire reports