The Slovakia international opened the scoring after just 14 minutes of the Group A match before the win was sealed by Edinson Cavani from the spot.
Speaking after the match, Hamsik was delighted with the victory - but has urged his side to stay grounded.
"We are very happy, Napoli have not played in this competition for many years," Hamsik told Sky Sport Italia after the game.
"We are very strong, but we must not get carried away with this win.
"Only with the right determination can we continue doing well.
"For now we have done nothing as there are still four games left to play."
Bayern Munich beat Manchester City 2-0 in the other Group A clash, meaning the Germans are top of the table followed by Napoli, who they play on Matchday Three.