Re-elected the chief minister in 2012 for five years, Modi, 62, told a group of school students here on Teacher's Day in response to a question: "I will serve my people till 2017."
He said in life "one should always dream of doing something".
Modi was made this year the Bharatiya Janata Party's Lok Sabha campaign chief, further fuelling speculation that he is in the race for the prime minister's post.
Photos: Katrina Kaif, Shamita Shetty at Mumbai airport
Photos: Varun Dhawan, Alia Bhatt promote 'Badri...' on 'Dil Hai Hindustani'
In pictures: 15 facts about kissing that will surprise you
Photos: Shahid Kapoor and Mira Rajput at cafe in Bandra
Photos: Deepika Padukone, Neha Dhupia and Soha Ali Khan at event