The Colombian international midfielder, 27, had previously been linked with Chelsea and Manchester United.
Guarin nearly joined Italian champions Juventus during the January transfer window before the deal fell through.
"I am very happy that I have reached another dream," he told Inter's official website. "I will share this with my family, my teammates and with the people I am closest to.
"Two years have passed since I arrived and it has always been a positive experience and, with every day that has gone by, I have learnt a little more. Today I can say that for the next three years I will use those experiences and the positive things I have picked up and make the most of them."
Guarin arrived at the San Siro from Porto in 2012.