A University of North Carolina faculty member was killed Monday afternoon after a gunman opened fire on the Chapel Hill campus, prompting a lockdown for three hours, the school said.