To his staff at South Block, his office of 10 years, Dr Singh said, "You served the nation well. God bless you."
He later chaired the last meeting of his cabinet's economic panel.
Dr Singh, 81, had announced earlier this year that he would not seek a third term even if the Congress-led United Progressive Alliance won this time.
Most exit polls after the national election show that the BJP and its allies, led by Narendra Modi, are set for a parliamentary majority. (read: Modi, BJP on Course for Election Victory, Exit Polls Show)
The prime minister, sources say, has been preparing for his exit for weeks. "His predecessor, Atal Behari Vajpayee, never got the time for long farewells as the BJP had not expected to lose in 2004," said an aide.
Tomorrow, Congress president Sonia Gandhi will host a dinner for him, where, sources say, he will be gifted a memento signed by all members of the Congress Working Committee, the party's top decision-making body, and union ministers.
The PM will chair his last Cabinet meeting on Saturday after which he will go and meet President Pranab Mukherjee. He is likely to address the nation after that.
In a blog today, BJP leader Arun Jaitley described Dr Singh as a man whose personal integrity was always above board, but whose, "inability to speak up within his own party may compel historians to take a different view." (read: On PM's Last Day at Work, Praise from Jaitley)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.