McKelvie, whose property fortune was estimated to be about $55 million in 2015, is believed to be Parliament's wealthiest MP.
McKelvie said it had been an "honour and a privilege" to be an MP.
"I came to the job with strong family ethos and a belief in the value of a hard day's work, personal responsibility and equal opportunity for all to succeed. I still stand by those values.
"In my time, I have had three Members' Bills pass through the House which I have been incredibly proud of – ranging from livestock rustling, speeding up court processing for dog control offences, and giving racegoers the option to BYO drinks, if a club holds an appropriate liquor licence."
Before entering Parliament, McKelvie had served as the Mayor of Manawatū.
McKelvie currently chairs the governance and administration select committee and sit on the primary production select committee. He was appointed Assistant Speaker in March.
McKelvie said he wanted to thank his "chief minder and wife Sue for her ongoing support and significant contribution" to his role as MP.
Bennett calculated he was the longest serving MP in the history of Hamilton.
"I came in with a focus of delivering infrastructure so Hamilton can take advantage of its geographical proximity in the golden triangle of growth of population, economy and industry for New Zealand," he said.
"Central to achieving this dream was to build the Waikato Expressway. As the leading advocate for this project, it has been transformational for Hamilton and the region, and will continue to deliver growth for the next generation."
Bennett said it was an "honour" to serve as a minister in the last government.
"It is now time for me to embark on a new stage of life and I am looking forward to spending more time with family and in the farming sector."