But the court declared the amnesty law unconstitutional.
President Maduro had condemned the law as an attempt to destabilise his leadership of the country.
The Supreme Court has consistently backed the Venezuelan government since the opposition triumphed in congressional elections in December.
In a statement, the court said the amnesty law was unconstitutional because it covered offences "that are acts of organised crime, which are not related to crimes of a political nature".
The opposition won parliamentary elections largely on a promise to work towards the release of dozens of what it considers political prisoners.
Among the detainees is Leopoldo Lopez, a prominent opposition leader who was sentenced to 13 years and nine months in prison last year for inciting violence during mass protests.
The prosecutor in the case later fled Venezuela and told media abroad that Mr Lopez`s conviction had been a political show trial.
Government officials maintain that Mr Lopez is responsible for violence that erupted during protests in which 43 people were killed in 2014.
Other political leaders who were set to be freed include the former Caracas Mayor Antonio Ledezma, who is under house arrest, and the former mayor of San Cristobal, Daniel Ceballos.
Members of the governing PSUV party had said the amnesty was a carte blanche for "murderers".
President Maduro had the choice of signing the law, sending it back to the National Assembly or challenging it before the Supreme Court.
Last week, he told supporters that he had decided to ask the court to invalidate the "criminal" bill.
More about:






