Commonly known as the "Vini. Jr. law" in reference to the Real Madrid forward, the measure is the first of its kind in the South American country.
Vinicius has been the target of repeated racist abuse in Spain, which has prompted widespread reaction from government officials in Brazil and throughout the world.
The new law, passed forward unanimously by Rio's legislative assembly (Alerj), dictates for an interruption or even termination of a sports event in which a racist act takes place.
Rio de Janeiro state representative Josemar, who put forward the proposal, said: "We have to eradicate this cancer that is racism once and for all, especially in sports. This law aims to combat racism and create an egalitarian society."
The new law also provides a protocol to direct racism complaints to the Public Prosecutor's Office and the referral of victims to the Public Defender's Office as well as other entities.
Vinicius, 22, has repeatedly complained about the Spanish authorities' and LaLiga's inaction around the issue of racism.
Following the latest racist abuse he suffered at Valencia's Mestalla Stadium on May 21 during a league game, Vinicius tweeted: "Racism in Spanish stadiums existed even before I was born. What has changed?"
Earlier this week, Spain's anti-violence commission proposed fines of €60,001 ($64,290) and two-year stadium bans for each of the four men accused of hanging an effigy of Vinicius from a bridge in Madrid in January.
The commission also proposed fines of €5,000 and one-year stadium bans for each of the three Valencia fans accused of racially abusing Vinicius on May 21.