The last train to Malaysia's capital Kuala Lumpur left before the Thursday midnight (1600 GMT) deadline from Tanjong Pagar station, a 79-year-old art deco structure in downtown Singapore that will be preserved as a monument.
Starting Friday, all rail services to Kuala Lumpur will leave from a modern facility in northern Singapore, linked by a causeway to Malaysia's Johor state.
With a sentimental final blast of a horn, Johor's Sultan Ibrahim Iskandar drove a train carrying railway staff in their blue uniforms back to Malaysia as hundreds of onlookers recorded the event with cameras and mobile phones.
The festive handover resolved a longstanding gripe among Singaporeans over Malaysia's continued ownership of land running deep into the city-state's territory, well after the two countries' acrimonious separation.
Ownership of the railway property was among the issues that took decades to negotiate after Singapore was ejected from the Malaysian federation in 1965 over differences in racial and other policies with Kuala Lumpur.
In a statement, Singapore Prime Minister Lee Hsien Loong called the handover a "historic breakthrough in bilateral relations" and thanked his Malaysian counterpart Najib Razak for making the deal possible.
"With the closing of this chapter, our countries can now move ahead to advance our many shared interests," Lee added.
In addition to the station, built in 1932 when the two countries were still British colonies, Singapore took possession of 174 hectares (429 acres) of rail land, some cutting through exclusive residential areas.
For its part in the deal, Malaysia received 60 percent control of a joint company that will develop prime land parcels around Marina Bay, Singapore's fashionable new financial and entertainment zone.
The six plots have an estimated market value of Sg$11 billion ($8.8 billion) after development, according to state investment agencies from both countries.
Singapore could also reap a fortune from the recovered rail land, but to its fans, the closure of the iconic Tanjong Pagar station represented more than commercial gain and territorial pride.
The station earned widespread affection as a transport hub, meeting place, tourist attraction and colourful home for Malay, Indian and Chinese food stalls reflecting the two countries' immigrant roots.
Singapore says the three-storey station, with four prominent sculptures on its stone facade, will be preserved as a national monument, easing fears it would be torn down to make way for another shopping mall or condominium.
The government has not decided what to do with the rail land between Tanjong Pagar and the new station that now handles train services to Malaysia.
Nature and heritage groups have urged Singapore authorities to turn the land into a green corridor of parks and paths.