McAfee did not announce a successor in a short statement posted on its website, but the company did say Hodges' former team would work directly with George Samenuk, chairman and chief executive officer.
Hodges said in a statement that he found Websense's expanding customer base, brand recognition and product line too good to pass up.
"Websense offers a unique opportunity to apply the knowledge and experience I have gained during my 11 years in the security software industry," he said. "Although I was not seeking a change, the position as CEO of Websense was simply too compelling to pass up."
Hodges has succeeded John Carrington, Websense CEO since May 1999. Hodges is also expected to be appointed to the company board of directors later this month, the San Diego-based company said.
After joining McAfee in 1995, Hodges held positions in product management, product marketing and business development. He was also vice president of marketing for a wireless data start-up, managing a $150 million office automation business for Digital Equipment, according to his biography on McAfee's website.
Carrington said he believes Websense will "realize its full potential as a recognized leader in web filtering and web security" under Hodges.
"We are delighted to welcome Gene as our new president and CEO," he said. "He is an experienced and well respected leader in the information security industry, has a proven track record in building a billion-dollar organization and is an innovative and effective business manager."