The Chechen leader Ramzan Kadyrov told Interfax that security forces staged a 20-minute operation to kill the attackers. He also confirmed that all the deputies who were in the parliament at the time were taken to safety.
Earlier the Itar-Tass news agency reported that several people had stormed the parliament in the capital Grozny and that shooting had continued inside.
Interfax said up to four militants were involved and three security guards had been killed. The Ria Novosti news agency said two people had died after a suicide bomber blew himself up in the grounds of the parliament.
Russia has been fighting insurgents in the Northern Caucasus region since the collapse of the Soviet Union.
A war with Chechen separatists took place between 1994 and 1996 before a second conflict broke out in 1999.
That war ended in 2000 but the violence has continued and over the past decade it has spread to other areas of the Northern Caucasus such as Dagestan and Ingushetia.
In March 40 people were killed when two female suicide bombers targeted the Moscow metro system.