The Glenrothes and Central Fife MP is due to retire but said he would continue working hard at Westminster for his constituents until his final day in the job, in 2015.
He was rector of Inverkeithing High School for 19 years and had a short spell in a similar role at Kirkcaldy High School before entering politics in November 2008 after winning the Glenrothes and Central Fife by-election.
He than doubled his majority to more than 16,000 at the 2010 General Election.
Mr Roy, who is married to Irene, has two sons, a daughter and five grandchildren.
He said: "I have spent more than four decades in public service, both in education and politics, but I have decided that I will stand down at the next election."
The 64-year-old Mr Roy, who was awarded the CBE in 2004 for his services to education in Scotland, added: "Most people would count themselves fortunate to have one career where they get enormous job satisfaction - I have been privileged to have two.
"However, all good things must come to an end and I have decided it is time to stand down.
"I am looking forward to spending more time with my family and friends, and I also want to renew a number of interests I have not had time to pursue.''
He added: "Although I have decided not to seek re-selection as the Labour candidate for Glenrothes and Central Fife, I want to stress that I will maintain my commitment to do my best for all my constituents until a new Westminster representative is elected in 2015."