Niyazov's wife, son, and daughter sat near the coffin, flanked by soldiers.
The 66-year-old Niyazov died on December 21 after 21 years of authoritarian rule. The official cause of death was heart failure.
Mourners, some of them weeping, filed past Niyazov's open coffin on display in Ashgabat's lavish presidential palace. Among those present were U.S. Assistant Secretary of State Richard Boucher and Russian Prime Minister Mikhail Fradkov.
Security was tight. Plainclothes police were seen everywhere in Ashgabat as people queued in orderly lines snaking past a tall, gilded statue of Niyazov that rotates to face the sun. The statue is the city's main landmark.
A Turkmen television announcer said the entire nation was mourning its "Great Leader."
"Our country is mourning," the announcer said. "The white city built by the Great Leader, one of the most beautiful cities in the world, the capital Ashgabat, is mourning. The Turkmen people and their many friends are mourning the death of the beloved leader."
A former Soviet-era communist apparatchik, Niyazov governed Turkmenistan like a personal fiefdom. It was a mix of old communist ways and the leader's eccentricities, which included an elaborate cult of his own personality. He had himself declared president for life.
Accompanied by music, Niyazov's coffin was later placed on a flower-laden trailer hitched to an armored personnel carrier. It began driving toward Niyazov's hometown of Kipchak, some 15 kilometers from the capital.
Buried In Kipchak
Later in the day, Niyazov's was laid to rest next to his mother, father, and two brothers in his family's Kipchak mausoleum.
An honor guard stands over Niyazov's coffin in Ashgabat today (AFP)
The West and Russia, both vying for influence over the energy-rich country's future leadership, are watching Turkmenistan closely.
A strategic Central Asian nation, Turkmenistan has gas reserves that are key to Europe, Russia, and the United States – a fact underscored today by the presence at the funeral of Aleksei Miller, head of the Russian gas monopoly Gazprom.
The United States often criticized Niyazov for human rights abuses.
But Boucher told reporters in Ashgabat that he had met with Deputy Prime Minister Gurbanguly Berdymukhammedov, who has been named acting head of state, today.
Boucher said he told Berdymukhammedov that Washington is “open to the possibility of a new beginning” in its relations with Turkmenistan. Boucher also said the United States supports Turkmen efforts to build new export routes for gas and oil. Gazprom currently controls virtually all of its routes.
Now, there is deep uncertainty over the future here. Niyazov left no heir apparent.
In a first sign that a power struggle is already under way, security forces led by Defense Minister Agageldy Mamedgeldyev have set up a new Security Council.
The highest representative body, the Khalq Maslakhaty or People's Council, is due to discuss the succession on December 26, when a date for a presidenial election is expected to be announced.