The Slovakia international added one year to his previous deal to put an end to speculation about a potential move away from the San Paolo.
"I have renewed my contract because I believe in Napoli and because I feel fine here," Hamsik told Sky Sport Italia.
"If I prefer to win the Coppa Italia to finishing third in Serie A? I do not rule anything out, we are playing for both things.
"It is a shame that we crashed out of the Champions League, but we did well and we want to continue like this."
|CELEBRATING THE CONTRACT?
|23/10||Marek Hamsik is 23/10 with PaddyPower to score anytime in Roma - Napoli|
"I am only looking at Napoli, not the other clubs," he added. "If we do well, then we will see what happens.
"If we get good results and win all of our matches, we can finish third. We must look at ourselves only."
The Partenopei will visit Roma on Saturday in their next league game.
How do you stay up to date with football when on the move? With http://m.goal.com – your best source for mobile coverage of the beautiful game.