The announcement came after a landmark evacuation deal that ended a ferocious month-long offensive waged on east Aleppo by government forces and allied militia.
The operation ended a battle that lasted nearly four and a half years, and transformed the city into a worldwide symbol of bloodshed and devastation.
Thousands of inhabitants in the western part of the city - which had remained under the regime's control throughout the conflict - took to the streets, chanting slogans and shouting their jubilation despite extreme cold.
Cars crawled along, their drivers sounding their horns, and in city squares, children had the colours of the Syrian flag painted on their cheeks.
Related reading
Aleppo evacutions continue, 'last convoys' expected
"Our joy is immense. Life returned to Aleppo today," said lawyer Omar Halli, who predicted "victory over all of Syria".
An army statement said the general command "announces the return of security to Aleppo after its release from terrorism and terrorists, and the departure of those who stayed there".
A rebel official said the loss was a major blow for the revolt against President Bashar al-Assad.
"On the political level, this is a great loss," Yasser al-Youssef of the Nureddin al-Zinki rebel group told AFP.
"For the revolution, it is a period of retreat and a difficult turning point."
The army announcement came after state television said the last convoy of four buses carrying rebels and civilians had left east Aleppo and arrived in the government-controlled Ramussa district south of the city.
Earlier, the Red Cross said more than 4000 fighters had left rebel-held areas in the final stages of the evacuation.
Biggest blow
The loss of east Aleppo is the biggest blow to Syria's rebel movement in the nearly six-year conflict, which has killed more than 310,000 people.
It puts the government in control of the country's five main cities: Aleppo, Homs, Hama, Damascus, and Latakia.
Syria's conflict began with anti-government protests in March 2011 but spiralled into a civil war after a brutal government crackdown on dissent.
It has drawn in proxy powers and attracted foreign jihadists, but successive attempts to negotiate a political solution to the conflict have failed.
Assad's victory in Aleppo is a boon for his allies in Moscow and Tehran and a defeat for the opposition's backers, including Saudi Arabia, Qatar, and some Western states.
Related reading
Fall of Aleppo shines harsh light on UN
Because of the intensity of these global rivalries - particularly between Russia and the United States - the international community struggled for years to respond to the bloodshed in Syria.
"The liberation of Aleppo is not only a victory for Syria but also for those who really contribute to the fight against terrorism, notably Russia and Iran," state news agency SANA quoted Assad as saying before the army announcement.
The final stages of the evacuation had been hampered by heavy snowfall and freezing temperatures.
"Overnight between Wednesday and Thursday, in one of the last stages of the evacuation, more than 4,000 fighters were evacuated in private cars, vans, and pick-ups from eastern Aleppo," said Ingy Sedky, the spokeswoman in Syria for the International Committee of the Red Cross.
She said about 34,000 people had left rebel areas of Aleppo under the evacuation plan.
Pivotal moment
Rebel forces, who seized east Aleppo in 2012, agreed to withdraw after a month-long army offensive that drove them from more than 90 per cent of their former territory.
The deal was brokered by Russia, which launched air strikes in support of Assad's regime last year, and Turkey, which has supported the rebels.
As part of the Aleppo evacuation deal, it was agreed some residents would be allowed to leave Fuaa and Kafraya, two Shiite-majority villages in northwestern Syria that are under siege by the Sunni Muslim rebels.
About 1000 people have been able to leave the villages in recent days.
The evacuation of Aleppo's rebel-held sector was a pivotal moment in a war that has triggered a major humanitarian and refugee crisis.
As well as a major strategic gain for Assad, the withdrawal has put the spotlight on the role of powerbrokers Russia, Iran and Turkey, which agreed this week to guarantee new peace talks and backed expanding a ceasefire.
Failed peace efforts
Repeated attempts at peace for Syria have failed, but UN envoy Staffan de Mistura has said he hopes to convene fresh talks in Geneva in February.
Once the beating heart of Syria's commercial and cultural industries, second city Aleppo had been split since July 2012 between rebels in the east and the government in the west.
East Aleppo became a powerful symbol for Syria's opposition, which set up its own administration to run schools, electricity and water there.
Opposition fighters lobbed rockets into government-held territory, and regime forces battered the east with air strikes and artillery.
Related reading
Concerns for those still left in eastern Aleppo
Moscow's military intervention in support of Assad marked a major turning point.
Defence Minister Sergei Shoigu said Thursday the Russian air force had killed 35,000 fighters in Syria since its intervention began in September last year.
Turkey launched its own campaign in late August in support of pro-Ankara rebels, with the aim of ousting Islamic State group jihadists as well as Kurdish militia from areas near its border.
IS released a video on Thursday purportedly showing two captured Turkish soldiers being burned alive, after Ankara vowed to fight "terror" in Syria in response to 16 of its troops being killed in battle.
The 19-minute video, showing two uniformed men being hauled from a cage before being bound and torched, was posted on jihadist websites and was supposedly shot in the IS-declared "Aleppo Province" in northern Syria.
Turkish air strikes meanwhile killed at least 47 civilians including 14 children in the IS-held town of Al-Bab, which Turkish forces have been seeking to capture for weeks, a monitoring group said. It was not possible to verify the claim.
Related reading
Aleppo's Twitter girl meets Erdogan