The law came only days after former Chechen president Salim Khan Yandarbiyev was killed in a car bombing in Doha.
Article three of the law mandates the death penalty or life in prison for "anyone founding, organising or managing a group or organisation to commit a terror act," according to details of the law published in the press on Tuesday.
The law imposes life in prison on "anyone aiding or abetting a terror group," or "forcing someone to be a member of a terrorist organisation."
As "for a terror conspirator who informs authorities of a plot before it is committed," the law provides clemency.
The amir, Shaikh Hamad bin Khalifa al-Thani, signed the bill
into law after it was approved by the cabinet and the Shura
Not a reaction
Fahd bin Mubarak al-Khayarin, the Shura's secretary general, denied that the law was a knee-jerk reaction to the Yandarbiyev killing, telling AFP the bill had been debatted "throughout December and over several sessions".
He declined to provide any further details, adding only that the legislation was "based on similar laws in neighbouring and Arab countries."
Yandarbiyev, who had been in Qatar for three years, died on Friday when a blast hit his white Land Cruiser in a residential area of Doha after he left weekly noon prayers at a mosque.
His 13-year-old son was wounded in the blast, which Qatari
authorities are still investigating.
Russia had demanded Yandarbiyev's extradition, but its SVR
foreign intelligence service denied Chechen rebel accusations that it was involved in his death.