The 58-year-old socialist leader's homecoming will fuel supporters' hopes he could return to active rule but there was no new information on his medical state and Chavez might be simply hoping to smooth a transition.
After a six-hour operation in Cuba on December 11, Chavez had not been seen or heard in public until photos were published of him on Friday.
"We have arrived back in the Venezuelan fatherland. Thanks, my God! Thanks, my beloved people! Here we will continue the treatment," Chavez said via Twitter after flying in.
There had been speculation Chavez was not well enough to travel despite wanting to return for continued treatment for the disease he was first diagnosed with in mid-2011.
"I remain attached to Christ and trusting in my nurses and doctors," Chavez also tweeted. "Onwards to victory forever! We will live and we will conquer!"
He added his thanks to Cuban leaders Raul and Fidel Castro for his treatment there.
Fireworks mark return
Chavez's arrival thrilled supporters in the nation of 29 million people, where his common touch and welfare policies have made him an idol to the poor.
"It's fabulous news, the best thing possible," Chavez's cousin, Guillermo Frias, told Reuters from the president's rural birthplace in Barinas state. "Venezuela was waiting for him, everyone wants to see him. Welcome home! Thank God he's back!"
Fireworks could be heard going off in some Caracas neighborhoods as news spread and celebrations began among "Chavistas."
Government ministers were jubilant with one singing "He's back, he's back!" live on state TV. They asked Chavez's euphoric supporters to respect the peace of patients at the military hospital.
Chavez's arrival implied some improvement in his condition, at least enough to handle a flight of several hours.
But aides have emphasized in recent days his state remains delicate. "It's a complex, difficult situation, but Chavez is battling and fighting for his life," Foreign Minister Elias Jaua said during the weekend as he described a recent visit to Chavez.
The December operation in Havana was his fourth for the cancer first detected in his pelvic area in June 2011.
On Friday, the government published photos showing Chavez lying in a hospital. Officials said he was breathing through a tracheal tube and struggling to speak.
Chavez's pre-dawn return was a typical surprise move for the former soldier whose rule has combined constant political theatrics with thundering anti-U.S. rhetoric, tough treatment of opponents and lavish spending of oil revenues on the poor.
Opponents have been decrying government secrecy over Chavez's condition, and some have called for a formal declaration that he is unfit to rule. That would trigger a new presidential election within 30 days, probably between Maduro and opposition leader Henrique Capriles.
Maduro, a 50-year-old former bus driver, is Chavez's preferred successor and would be favorite to win a close vote in such a scenario.
"Uncertainty over a possible presidential election remains intact, despite the president's return," Venezuelan political analyst Luis Vicente Leon said.
After winning re-election in October last year, and wrongly declaring himself cured, Chavez was unable to attend his own swearing-in ceremony in January. To the fury of his foes, Venezuela's Supreme Court ruled that he remained president and could be sworn in later.
That could now happen at the military hospital.
"Now the president is back, there can be no doubt about the democratic institutions working in Venezuela," Information Minister Ernesto Villegas said.
"There were some who dream of unseating Chavez and the revolution, but here we always said Chavez is the president elected and re-elected by will of the Venezuelan people."
Chavez's return will eclipse national debate over a recent devaluation of the local currency. It has proved highly popular among Venezuelans but opposition parties see it as evidence of economic incompetence by the government.
Unlike previous returns to Venezuela after treatment, state media showed no images of Chavez this time.
His lengthy absence in Cuba had fuelled a long-held opposition accusation that Venezuela's government was being manipulated and directed from Havana. Former Cuban leader Fidel Castro is a political mentor and father figure to Chavez and Castro visited him regularly in the hospital.
Some 20 Venezuelan students have spent the past four days chained up close to the Cuban Embassy in Caracas in protest of what they see as interference from Havana in internal affairs.
Capriles welcomed Chavez back but pointedly said he hoped it would mean a return to order in government and attention to Venezuelans' daily problems.