The 54-year-old socialist leader, who has faced three months of opposition protests as well as dissent from within government, said the helicopter shot at the judicial building and also threw some grenades.
Witnesses reported hearing several detonations in downtown Caracas, where the pro-Maduro Supreme Court, the presidential palace and other key government buildings are located.
The helicopter also flew over the Interior Ministry, Maduro said in a speech.
"Sooner rather than later we are going to capture the helicopter and those behind this armed terrorist attack against the institutions of the country," he said.
The Supreme Court is particularly hated by Maduro's opponents for its string of rulings bolstering his power and undermining the opposition-controlled legislature.
"There was a social activity going on in the Supreme Court. They could have caused dozens of deaths," Maduro said of the helicopter attack.
Opposition leaders have long been calling on Venezuela's security forces to stop obeying a president they call a murderous dictator.
But there was also some speculation on social media among opposition supporters that the helicopter attack could have been staged to justify repression or cover up drama at Venezuela's National Assembly, where two dozen lawmakers said they were being besieged by pro-government gangs.
Earlier on Tuesday, Maduro warned that he and supporters would take up arms if his socialist government was violently overthrown by opponents who have been on the streets since April. At least 75 people have died in the unrest.
"If Venezuela was plunged into chaos and violence and the Bolivarian Revolution destroyed, we would go to combat. We would never give up, and what couldn't be done with votes, we would do with arms, we would liberate the fatherland with arms," he said.
He has touted the assembly as the only way to bring peace to Venezuela. But opponents, who want to bring forward the next presidential election scheduled for late 2018, say it is a sham poll designed purely to keep the socialists in power.
They are boycotting the vote, and protesting daily on the streets to try and have it stopped. Opposition leaders call Maduro a tyrant who has wrecked a once-prosperous economy, while he calls them violent coup leaders following U.S. orders.
Maduro, who accuses Washington of seeking to control the nation's oil wealth, said the "destruction" of Venezuela would lead to a huge refugee wave dwarfing the Mediterranean crisis.
"Listen, President Donald Trump," he said earlier on Tuesday. "You would have to build 20 walls in the sea, a wall from Mississippi to Florida, from Florida to New York, it would be crazy ... You have the responsibility: stop the madness of the violent Venezuelan right wing."
Opposition to the July 30 vote has come not just from Venezuelan opposition parties, but also from the chief state prosecutor Luisa Ortega and one-time government heavyweights like former intelligence service boss Miguel Rodriguez.
At a news conference on Tuesday, Rodriguez criticized Maduro for not holding a referendum prior to the Constituent Assembly election, as his predecessor Chavez had done in 1999.
"This is a country without government, this is chaos," he said. "The people are left out ... They (the government) are seeking solutions outside the constitution ... That deepens the crisis."
Maduro said an ex-pilot of Rodriguez was involved in Tuesday's helicopter attack.
(Additional reporting by Deisy Buitrago, Girish Gupta, Eyanir Chinea, Andrew Cawthorne and Andreina Aponte; Writing by Andrew Cawthorne; Editing by Andrew Hay and Paul Tait)
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)