Hodges will take up his new role on 13 July and report to Twitter comms director, EMEA, Rachel Bremer.
Hodges joined the BBC in 2010 and currently leads all comms for BBC Television. He has previously worked at Channel 4 and ITV in senior comms roles.
John Shield, director of comms at the BBC, said: "Sam has been an exceptional colleague and has had a huge impact at the BBC – delivering some truly outstanding comms under often testing circumstances. While we will all miss his expertise and insight, we will also miss his consistent good humour and 'can do' approach."
Earlier this week, Twitter comms director Rachael Horwitz announced via a tweet that she was leaving the company and joining social media rival Facebook, as director of technology comms. Horwitz had been at Twitter for four years.