The lower house of parliament, the Duma, passed the bill unanimously in its crucial second and penultimate reading.
It still needs a third reading and then it goes to the upper house Federation Council before signing by President Vladimir Putin.
Russia's organised rival football fan groups model themselves on British hooligan "firms" and communicate on the Internet, with some taking part in nationalist rallies in their team scarves.
In 2012, Zenit Saint Petersburg fans threw a firecracker at Dinamo Moscow goalkeeper Anton Shunin, forcing the match to be abandoned.
More From This Section
Russia's hosting of the World Cup in 2018 would mark the most high-profile sports event ever held in the country.
The bill would try to control fans by allowing the government to rule that tickets for certain sports events can only be bought by fans who show ID.
Under the proposed legislation, those fans who caused a match to be abandoned could spend 15 days in cells or get a ban for up to a year.
Currently the maximum fine for fans who cause a match to be stopped is just 2,000 rubles and the top penalty for fans who commit a less serious offence is 1,000 rubles.
The bill also calls for trained stewards to be present in stadiums, which are now largely guarded by police. The stewards would have powers to search fans and prevent black-listed fans from entering.
In December 2010, fans ran amok in central Moscow, beating up migrants from the North Caucasus after men from the region allegedly shot dead a Spartak Moscow fan in a fight. Twenty-nine were injured.
Yet in an ambiguous response, Putin opted to meet leaders of fan groups and visited the grave of the man killed.