The Brazilian playmaker will move from the Coppa Italia champions after four years with the club and continue his career at San Siro.
The Nerazzurri were desperate to strengthen their squad after a series of disappointing results in the past few months and had already brought in Danilo D'Ambrosio from Torino during the January transfer window.
Hernanes had established himself as a firm favorite with Lazio fans following his arrival at the Stadio Olimpico from Sao Paulo in 2010, playing 154 matches for the Biancocelesti and scoring 40 goals.
However, he has now penned a contract with Inter until the summer of 2018, worth 2.8 million euros per season.
The Brazilian insisted, though, during an interview with Lazio Style Radio that financial gain had had nothing to do with his decision to move to San Siro.
"I'm not leaving Lazio for money; my wife Erika knows the truth," he said. “Now I've made my choice, I would like to say thanks to all of you, the president, my teammates and all the supporters. In my life I always tried to do my best, now I have the feeling it's time to make a change.
"It has been a hard night [Thursday], I didn't sleep at all. I knew the supporters loved me, I couldn't imagine they did so much. I'll keep them in my heart"The 28-year-old played an integral role for Lazio in its Coppa Italia triumph last season and around 200 Lazio fans protested the sale Thursday at the club's Formello training ground with the Brazil international reduced to tears as he explained his desire to move on from the Italian capital side.
Inter currently sits fifth in the Serie A table with 33 points from 21 games.