The deal is pending board approval, sources said.
McGrath replaces Kevin Keatts, who left earlier this month to become the head coach at NC State.
McGrath has been at North Carolina for 14 seasons, following Roy Williams from Kansas in 2003. He had played under Williams for four seasons at Kansas and began his coaching career on Williams' staff in Lawrence.
North Carolina plays Oregon on Saturday in the Final Four.