Martinez has 378 appearances for Inter, scoring 175 goals after arriving from Racing Club in 2018. He is the 3rd-highest goalscorer in Inter history, behind Giuseppe Meazza (284) and Alessandro Altobelli (209).
The World Cup winner grabbed 17 goals and 6 assists for the Italian champions last season, attracting attention from across Europe once more.
Interest came from Barcelona, who lost Robert Lewandowski this summer. The side have since brought in Gabriel Jesus before the summer window slammed shut but Martinez confirmed talks took place over the past few months.
"When these offers and calls come in, it is always a pleasure, because you work to stay at the top. The rumours were true, but I am very clear about my ideas: I wanted to stay here with my teammates and with these magnificent fans," Martinez told Sky Italia.
"I would stay forever and, as long as they want me, I will stay here. But in this job we already know how it is: when you are no longer useful, they throw you out.
"Inter means everything to me: pride, happiness, and the desire to keep moving forward. I have chosen to stay here again, I want to do great things at Inter.
"I never imagined reaching this point in my career with Inter, achieving all my goals. This motivates me to keep moving forward; it's my mentality. I try to give my all in every training session.
"In football, you never know what is going to happen, but today I have a contract and I am happy. I decided to stay because I feel good and I want to achieve great things at Inter."
Martinez remains loyal to Inter as the club face Napoli at the San Siro on Saturday evening where Barcelona will keep a close eye on him despite his desire to stay put.
