The Scotland striker, 32, spent the last 18 months on loan at Tynecastle, scoring 18 times in 48 appearances.
Despite undergoing two knee operations last season, Naismith was Hearts' top scorer with 14 goals in 27 games.
"I'll see out my playing days here at Hearts. That was something for me to think about," Naismith said.
"To be honest, in my 18 months here that has been my mindset. Hearts like what I bring and I like what Hearts bring to me and it will develop as the years go on.
"At this stage of your career you do need to think about what you want to do in the game, or what you want to do in the time remaining as a player, so that took a bit of time with making my decision."